Thanks!  I can work around it for now since I know the issue is there -
just working on translating some v5 configs to v6 to learn the new syntax
better.

Brian

On Wed, May 2, 2012 at 9:53 AM, Rainer Gerhards <[email protected]>wrote:

> Looks like a bug - currently in the middle of s/t else, will look asap...
>
> Rainer
>
>
>
> > -----Original Message-----
> > From: [email protected] [mailto:rsyslog-
> > [email protected]] On Behalf Of Brian Knox
> > Sent: Wednesday, May 02, 2012 3:52 PM
> > To: rsyslog-users
> > Subject: Re: [rsyslog] omfile output with templates
> >
> > Here you go:
> >
> > I see it setting the template here:
> >
> > 6541.655513287:7f4befcc4700: cnf:global:cfsysline: $template test,
> "%msg%\n"
> > 6541.655528924:7f4befcc4700: lex: LEGA ACT: '/var/log/test.log;test'
> > 6541.655539923:7f4befcc4700: cnf:global:rule
> >
> > And here's the action that is bombing:
> >
> > 6541.655703419:7f4befcc4700: ------ start rule 0x1c64db0:
> > 6541.655708278:7f4befcc4700: filter:script:
> > 6541.655718946:7f4befcc4700: var '$msg'
> > 6541.655723902:7f4befcc4700: aclst 0x1c69470: V2 action type: nvlst
> > 0x1c69d00:
> > 6541.655737944:7f4befcc4700:    name: 'template', value 'test'
> > 6541.655743903:7f4befcc4700:    name: 'name', value 'test_me'
> > 6541.655749498:7f4befcc4700:    name: 'file', value
> > '/var/log/with_template.log'
> > 6541.655754896:7f4befcc4700:    name: 'type', value 'omfile'
> > 6541.655759855:7f4befcc4700: aclst 0x1c69eb0: V2 action type: nvlst
> > 0x1c69e80:
> > 6541.655771954:7f4befcc4700:    name: 'name', value 'test_me2'
> > 6541.655777459:7f4befcc4700:    name: 'file', value
> > '/var/log/without_template.log'
> > 6541.655782599:7f4befcc4700:    name: 'type', value 'omfile'
> > 6541.655787498:7f4befcc4700: ------ end rule 0x1c64db0
> > 6541.655792805:7f4befcc4700: aclst 0x1c69470: v6+ action object
> > 6541.655805520:7f4befcc4700: XXXX: in nvlstGetParam, name 'name', type
> 11,
> > valnode->bUsed 0
> > 6541.655812221:7f4befcc4700: XXXX: in nvlstGetParam, name 'type', type
> 12,
> > valnode->bUsed 0
> > 6541.655819769:7f4befcc4700: action param blk after actionNewInst:
> > 6541.655824983:7f4befcc4700: name:  'test_me'
> > 6541.655837978:7f4befcc4700: type:  'omfile'
> > 6541.655850164:7f4befcc4700: action.writeallmarkmessages: (unset)
> > 6541.655861849:7f4befcc4700: action.execonlyeverynthtime: (unset)
> > 6541.655872881:7f4befcc4700: action.execonlyeverynthtimetimeout: (unset)
> > 6541.655884074:7f4befcc4700: action.execonlyonceeveryinterval: (unset)
> > 6541.655895170:7f4befcc4700: action.execonlywhenpreviousissuspended:
> > (unset)
> > 6541.655906453:7f4befcc4700: action.repeatedmsgcontainsoriginalmsg:
> > (unset)
> > 6541.655917566:7f4befcc4700: action.resumeretrycount: (unset)
> > 6541.655928601:7f4befcc4700: action.resumeinterval: (unset)
> > 6541.655941032:7f4befcc4700: newActInst (omfile)
> > 6541.655948787:7f4befcc4700: XXXX: in nvlstGetParam, name 'file', type
> 12,
> > valnode->bUsed 0
> > 6541.655954840:7f4befcc4700: XXXX: in nvlstGetParam, name 'template',
> type
> > 11, valnode->bUsed 0
> > 6541.655960231:7f4befcc4700: action param blk in omfile:
> > 6541.655965033:7f4befcc4700: dynafilecachesize: (unset)
> > 6541.655976530:7f4befcc4700: ziplevel: (unset)
> > 6541.655987703:7f4befcc4700: flushinterval: (unset)
> > 6541.656008159:7f4befcc4700: asyncwriting: (unset)
> > 6541.656019921:7f4befcc4700: flushontxend: (unset)
> > 6541.656031224:7f4befcc4700: iobuffersize: (unset)
> > 6541.656042390:7f4befcc4700: dirowner: (unset)
> > 6541.656053626:7f4befcc4700: dirgroup: (unset)
> > 6541.656064909:7f4befcc4700: fileowner: (unset)
> > 6541.656075955:7f4befcc4700: filegroup: (unset)
> > 6541.656086790:7f4befcc4700: dircreatemode: (unset)
> > 6541.656097893:7f4befcc4700: filecreatemode: (unset)
> > 6541.656108949:7f4befcc4700: failonchownfailure: (unset)
> > 6541.656119810:7f4befcc4700: createdirs: (unset)
> > 6541.656131030:7f4befcc4700: sync: (unset)
> > 6541.656142036:7f4befcc4700: file:  '/var/log/with_template.log'
> > 6541.656154262:7f4befcc4700: dynafile: (unset)
> > 6541.656165117:7f4befcc4700: template:  'test'
> > 6541.656190369:7f4befcc4700: Module builtin-file processes this action.
> > 6541.656200401:7f4befcc4700: Called LogError, msg:  Could not find
> template
> > '??' - action disabled
> >
> >
> > On Wed, May 2, 2012 at 9:45 AM, Rainer Gerhards
> > <[email protected]>wrote:
> >
> > > Can you post the relevant part oft he debug log?
> > >
> > > > -----Original Message-----
> > > > From: [email protected] [mailto:rsyslog-
> > > > [email protected]] On Behalf Of Brian Knox
> > > > Sent: Wednesday, May 02, 2012 3:44 PM
> > > > To: rsyslog-users
> > > > Subject: [rsyslog] omfile output with templates
> > > >
> > > > Last question of the day, hopefully.
> > > >
> > > > I'm playing around with v6 config format and I'm having trouble
> passing
> a
> > > > template to an omfile output action.  Here's my sample config:
> > > >
> > > > $ModLoad immark         # provides -MARK- message capability
> > > > $ModLoad imuxsock       # provides support for local system logging
> (e.g.
> > > > via logger command)
> > > > $ModLoad imklog         # kernel logging (formerly provided by
> rklogd)
> > > >
> > > > $template test, "%msg%\n"
> > > >
> > > > *.* /var/log/test.log;test
> > > >
> > > > if ($msg) then {
> > > >         action(type="omfile" file="/var/log/with_template.log"
> > > > name="test_me" template="test")
> > > >         action(type="omfile" file="/var/log/without_template.log"
> > > > name="test_me2")
> > > > }
> > > >
> > > > With this config, I get meswsages in test.log and
> without_template.log,
> > > but
> > > > nothing in with_template.log.  I'm also getting this error message:
> > > >
> > > > 2012-05-02T09:41:50.719197-04:00 localhost rsyslogd-3003: Could not
> find
> > > > template '??' - action disabled
> > > >
> > > > I suspect I'm trying to pass the template value incorrectly?
> > > >
> > > > Brian
> > > > _______________________________________________
> > > > 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
> > > _______________________________________________
> > > 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
> > >
> > _______________________________________________
> > 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
> _______________________________________________
> 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
>
_______________________________________________
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

Reply via email to