> -----Original Message----- > From: [email protected] [mailto:rsyslog- > [email protected]] On Behalf Of [email protected] > Sent: Tuesday, November 16, 2010 7:21 PM > To: rsyslog-users > Subject: Re: [rsyslog] Handle unsuccessful SQL statements > > On Tue, 16 Nov 2010, Marc Schiffbauer wrote: > > > Hi all, > > > > Can rsyslog distinguish between "DB-Service not available" and single > "SQL Statement failed" conditions? > > > > Background is that I want rsyslog to to retry for a infinite numer of > times if the postgresql is down > > but I do not want it to DOS the PG-server until the end of time if a > single SQL statements fails. > > > > Is this possible? > > it is possible in theory at least. When we were developing the new > batched > (vector) interface for database plugins this was one of the issues that > we > discussed. This is implemented in the om database module because it can > tell the difference between the two types of errors. > > unfortunantly I don't remember the details of making this work, but I > think that if you set rsyslog to retry forever, but it the om module > will > not keep retrying a bad statement.
Yup, the engine is capable of that, but the capability depends on the return codes from the ouput module. I think I at least tried to modify ompgsql so that it returns the required codes (even though I am no postres expert at all). I'd say there is a 70% chance the module supports it. Rainer > > I would suggest giving it a try. setup a output format that does not > auto-quote the parameters and then try sending 'good' log messages > through to verify things are working, then send a 'bad' log message > through (say something with a quote in it) and see if that jams things > up > or if it gets dropped (hopefully with an error being logged by rsyslgo) > and then following log messages go through. > > David Lang > _______________________________________________ > 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

