ah, ok, I thought you wanted to chain two actions. Ruleset include is most
probably the way to go. Have a look at omruleset. However, I remember that it
is really hard to setup -- when I did this, it was the first time that I
*really* noticed the need for a new config format myself ;)

Rainer

> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Marc Schiffbauer
> Sent: Thursday, November 04, 2010 5:34 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] One Queue for multiple Actions in 4.6.4?
> 
> ----- Ursprüngliche Mail -----
> > You can chain the actions via &.
> 
> But that is like a logical AND, right?
> What I would need then is an OR...
> 
> Example:
> #----------------------
> # Action 1
> if $syslogtag startswith 'service[' \
>         and $msg contains 'FOO' \
> then :ompgsql:localhost,db01,dbuser,dbpass;template_A1
> 
> # Action 2
> if $syslogtag startswith 'service[' \
>         and $msg contains 'BAR' \
> then :ompgsql:localhost,db01,dbuser,dbpass;template_A2
> #----------------------
> 
> template_for_A1 does an INSERT on the database while template_for_A2
> does an UPDATE to the row INSERTed by Action 1
> 
> So its fundamental that Action 2 is always executed AFTER Action 1.
> 
> Without Queueing, this is working. But how to enable queuing so that
> behavior
> will be maintained?
> 
> Ideally only those two Actions would build a single queue not affecting
> other things
> like file writing.
> 
> 
> >
> > This video tutorial may be useful:
> >
> > http://www.rsyslog.com/article350/
> >
> 
> Thanks for that hint. Nice thing. But it does not really help in that
> particular case :-/
> 
> -Marc
> 
> 
> > Rainer
> >
> > > -----Original Message-----
> > > From: [email protected] [mailto:rsyslog-
> > > [email protected]] On Behalf Of Marc Schiffbauer
> > > Sent: Thursday, November 04, 2010 10:34 AM
> > > To: [email protected]
> > > Subject: [rsyslog] One Queue for multiple Actions in 4.6.4?
> > >
> > > Hi,
> > >
> > > I have a rather complex config which puts logs into a database by
> > > using
> > > several Templates with
> > > different SQL-Statements and so I use several Actions which match
> > > different log-lines.
> > >
> > > And I want rsyslog to do disk assisted queuing in case of DB-
> failure
> > > or
> > > lag.
> > >
> > > Question: Is is possible in 4.6.4 to have ONE queue with MULTIPLE
> > > actions so that
> > > queued SQL-Statements will be processed in correct order like it
> > > would
> > > be done without queueing?
> > >
> > > Or do I have to use the MainQueue for that which will affect
> > > log-files
> > > in case of DB failure?
> > >
> > > TIA
> > > -Marc
> 
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to