<br><br><div class="gmail_quote">On Thu, Jul 3, 2008 at 6:44 PM, Adam Hewitt <<a href="mailto:ahewitt@theozhewitts.com" target="_blank">ahewitt@theozhewitts.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi All,<br>
<br>
I am trying to get snmptraps passed through to syslog-ng and then sent through an interpretor into Nagios. I have snmptrapd logging to syslog, and I have added the following lines to syslog-ng.conf:<br>
<br>
destination d_nagios { file("/tmp/test_file.txt"); };<br>
filter f_snmptrap { program("snmptrapd"); };<br>
log { source(s_sys); filter(f_snmptrap); destination(d_nagios); };<br>
<br>
sending it to the test_file was just to make sure I was actually catching the snmptrapd logs which I am not.<br>
<br>
I have tried a number of variations on the ("snmptrapd") such as ("snmptrapd\[.*\]") and none of them work.<br>
<br>
can anyone see where my logic has gone astray?<br>
<br>
cheers,<br>
<br>
Adam.</blockquote><div><br><br>Hey Adam,<br><br>It's been a while, how's it going ;)<br><br>Can't see anything obviously wrong - but I am wondering about 'snmptrapd' and if it's actually logging to the source you are using?  Depending on the version of snmptrapd / dist, you have to specify -Ls for it to use syslog...   But what does source s_sys look like?<br>
<br>What about just removing the filter and dumping source s_sys straight to that temp file - just to make sure the messages are coming through that source and to double check the program name?<br>
<br>That's where I'd start anyway.<br><br>Ryan<br><br><br></div></div><br>