I found this, but I’m not sure why it’s broken.


Here is the entire contents of 42.foo.conf:





$template newformat,'%TIMESTAMP% %FROMHOST% %syslogtag%%msg%\n'



if $fromhost-ip == '192.168.69.120' then /var/log/network.log;newformat

& ~



if ($fromhost-ip startswith '162.246.19' or  $fromhost-ip startswith
'208.184.72.') then /var/log/network.log

& ~



The debug of the start:



3129.504476068:7f7fc6e10780: tried selector action for builtin:omfile: 0

3129.504523508:7f7fc6e10780: Module builtin:omfile processes this action.

3129.504541988:7f7fc6e10780: Called LogError, msg:  Could not find template
'newformat' - action disabled

rsyslogd:  Could not find template 'newformat' - action disabled [try
http://www.rsyslog.com/e/3003 ]

3129.504618656:7f7fc6e10780: Called LogError, msg: error during parsing
file /etc/rsyslog.d/42-foo.conf, on or before line 3: errors occured in
file '/etc/rsyslog.d/42-foo.conf' around line 3

rsyslogd: error during parsing file /etc/rsyslog.d/42-foo.conf, on or
before line 3: errors occured in file '/etc/rsyslog.d/42-foo.conf' around
line 3 [try http://www.rsyslog.com/e/2207 ]

-> $$ = nterm s_act ()

Stack now 0 1 18 42 61

Entering state 22

Reducing stack by rule 32 (line 165):

   $1 = nterm s_act ()

-> $$ = nterm actlst ()

Stack now 0 1 18 42 61

Entering state 21

Reading a token: Next token is token '&' ()

Shifting token '&' ()

Entering state 44

Reading a token: Next token is token LEGACY_ACTION ()

Shifting token LEGACY_ACTION ()

Entering state 12

Reducing stack by rule 35 (line 169):

   $1 = token LEGACY_ACTION ()

3129.505415548:7f7fc6e10780: tried selector action for builtin:omfile: -2001

3129.505429278:7f7fc6e10780: tried selector action for builtin:ompipe: -2001

3129.505480667:7f7fc6e10780: tried selector action for builtin-shell: -2001

3129.505494190:7f7fc6e10780: discard

3129.505506733:7f7fc6e10780: Called LogError, msg: warning: ~ action is
deprecated, consider using the 'stop' statement instead

rsyslogd: warning: ~ action is deprecated, consider using the 'stop'
statement instead [try http://www.rsyslog.com/e/2307 ]

3129.505576669:7f7fc6e10780: tried selector action for builtin:omdiscard: 0

3129.505628375:7f7fc6e10780: Module builtin:omdiscard processes this action.

-- 
THE INFORMATION CONTAINED IN THIS ELECTRONIC TRANSMISSION AND ANY 
ATTACHMENTS HERETO IS CONSIDERED PROPRIETARY AND CONFIDENTIAL. DISTRIBUTION 
OF THIS MATERIAL TO ANYONE OTHER THAN THE ADDRESSED IS PROHIBITED. ANY 
DISCLOSURE, COPYING, DISTRIBUTION, OR USE OF THE CONTENTS OF THIS 
TRANSMISSION OR ANY ATTACHMENTS HERETO FOR ANY REASON OTHER THAN THEIR 
INTENDED PURPOSE IS PROHIBITED. IF YOU HAVE RECEIVED THIS TRANSMISSION IN 
ERROR, PLEASE CONTACT THE SENDER. 

*P **Please consider the environment before printing this e-mail*  
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to