Re: MSGPATH x syslog
Posted in 2010
On Tue, Nov 23, 2010 at 11:01 PM, Cesar Inacio Martins < cesar_inacio_martins@yahoo.com.br> wrote: > Hi, > > Anyone know if is possible redirect the output of the MSGPATH to > Linux/syslog ? > > I already think try use a pipe file + logger command... but , isn't > elegant and I not sure if will work properly. > > Regards > Cesar > Hello Cesar. I wouldn't suggest that solution. It's not clear to me what (and when) will happen if the logger process gets killed. All pipes will buffer (and I've seen amazing buffer capabilities....) but we never know how long... And you could end up with the engine trying to write to a "full" fifo. It could cause problems in the engine, or at best you could loose messages. So, I would suggest another approach... I think that what's relevant is the events. So you could alter the ALARMPROGRAM script and enable it to use logger. In fact I've done it for a customer. The altered script has the ability to send emails, send SMS, and write to the syslog using logger. The only problem I see is that unfortunately there are still important events that don't call the ALARMPROGRAM... This is a real shame, but there are solutions. One I've implemented is a relatively complex script that keeps an eye on the message log. For each message it reads it searches for it in a config file where regular expressions are associated with actions. These actions can be functions defined in yet another script, or simply a call to the alarmprogram with extended event codes. You could also turn on ALARM_ALL_EVENTS (possibly misspelled) ONCONFIG option. Finally there is a nice trick that can be done with sysmaster:sysonlinelog but I would need to elaborate more on this carefully. But basically you could write a task for the DB scheduler that keeps track of the last position it checked, and that keeps "trailing" the new lines in onlinelog using the SQL interface. If you're interested in any of this ideas I can provide more help... Regards. _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --0015174c0c606bf5020495c11ab3