[rsyslog-notify] Forum Thread: Trying to use regex in rsyslog template to parse info - (Mode 'post')
noreply at adiscon.com
noreply at adiscon.com
Thu Feb 20 14:38:15 CET 2014
User: robelgado
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24245#p24245
Message:
----------
$template FixFormat,
"%msg:R,ERE,5,DFLT:!([^!]+)!([^!]+)!([^!]+:[^!]+:[^!]+)!([^!]+)!([^!]+)!([^!]+)!([^!]+)!!([^!]+.[^!]+.[^!]+.[^!]+)!!!!([^!]+)!([^!]+)!--end%
%msg:R,ERE,4,DFLT:!([^!]+)!([^!]+)!([^!]+:[^!]+:[^!]+)!([^!]+)!([^!]+)!([^!]+)!([^!]+)!!([^!]+.[^!]+.[^!]+.[^!]+)!!!!([^!]+)!([^!]+)!--end%
%msg:R,ERE,9,DFLT:!([^!]+)!([^!]+)!([^!]+:[^!]+:[^!]+)!([^!]+)!([^!]+)!([^!]+)!([^!]+)!!([^!]+.[^!]+.[^!]+.[^!]+)!!!!([^!]+)!([^!]+)!--end%\n"
That is what I am using to pull out three separate variables from a string
that is separated as with exclamation marks as follows:
!string!string!string!string!string!string!string!!string!!!!string!string!
I know that the regular expression works as I have matched it to the regex
tester provided on the rsyslog webpage.
Any ideas as to why the template won't output any information?
More information about the rsyslog-notify
mailing list