[syslog-ng] syslog-ng to trigger SNMP traps

Alan McKinnon Alan.McKinnon at is.co.za
Thu Mar 18 07:45:59 CET 2010


On Thursday 18 March 2010 04:14:05 Xuan Zhong wrote:
> Hi,
> 
> I wrote a script to filter out the matching syslog messages and send as
> SNMP traps. In syslog-ng.conf, I use:
> 
> filter f_snmp { match("XXXX" value("MESSAGE"))
> destination d_snmp(program("send_trap.sh"))
> 
> If I use logger to manually generate the messages, the traps can be sent
> successfully. But if the exact same syslog message that was generated by a
> program, the traps were not triggered. I use syslog-ng version 3.0.5-1
> x86_64.
> 
> Can anyone provide any insight on this issue?


My guess is that your source program is sending mal-formatted messages. Send 
those messages and those from logger to a disk file where you can compare them 
side-by-side.


-- 
Alan McKinnon
Systems Engineer^W Technician
Infrastructure Services
Internet Solutions

+27 11 575 7585

Please note: This email and its content are subject to the disclaimer as displayed at the following link http://www.is.co.za/legal/E-mail+Confidentiality+Notice+and+Disclaimer.htm. Should you not have Web access, send a mail to disclaimers at is.co.za and a copy will be emailed to you.


More information about the syslog-ng mailing list