> Sorry if this is a stupid question.
> As I don't know many things about SNMP
> by reading the documentation for syslog-ng
> I didn't understand whether syslog-ng
> can actually send SNMP traps or not.
> If it does, how does it do it?
syslog-ng by itself cannot send SNMP traps, but you can extend it with a
small program which can. For example:
source src { unix-stream("/dev/log"); internal(); };
destination traps { program("/usr/local/sbin/sendtraps"); };
log { source(src); destination(traps); };
And /usr/local/sbin/sendtraps contains:
#!/bin/sh
while read line; do
snmptrap ...
done
of course you might need to filter messages going out as traps.
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
url: http://www.balabit.hu/pgpkey.txt
Hi All,
I'm running ver 1.4.9a and I'm need of some assistance on the configs, I'm going to be using syslog to receive remote messages from approximately 60+ routers. the problem I'm having is that I cant seem to set up syslog-ng to run in real time. By doing an strace I do see that I'm receiving the message but syslog appears to hold them and dump multiple messages at one time, I've enabled sync(0) but that doesn't seem to help.
Second is that when syslog-ng does write to the file it removes the carriage returns at the end of the lines, thus making it difficult to read. Below is a copy of my test config, any suggestions would be appreciated.
Aaron
options { sync(0); use_dns(NO); create_dirs(yes); };
source UDP { udp(); };
destination ATLSSR1 { file("logs/ATLSSR1.html"); };
destination Default { file("logs/default.html"); };
filter ATLSSR1 { host(10.192.224.1); };
log { source(UDP); filter(ATLSSR1); destination (ATLSSR1); };
log { source(UDP); filter(DEFAULT); destination(Default); };
------------------------------------------------------------
--== Sent via Deja.comhttp://www.deja.com/ ==--
Before you buy.