[syslog-ng]sending snmptraps w/ snmptrap

syslog-ng@lists.balabit.hu syslog-ng@lists.balabit.hu
Tue, 23 Sep 2003 09:57:22 +0200


Hi!

I am trying to send an snmptrap if a critical or error-Message occures.=

I found some scripts in the net which told me to use

destination traps {program("/usr/local/sbin/sendtrap.sh"); };
with following script
#!/bin/sh
while read line; do
     snmptrap ....
done

It has the problem that I can not manipulate the snmptrap statement,  I=
  tried
further:

destination d_send_trap {
        pipe("/tmp/snmptrap.pipe"
        template("snmptrap ..... '$HOST' '$FACILITY' '$PRIORITY' ... '$=
MSG'\n")
        template-escape(yes));

now I have the trouble how I get the statement from the pipe into execu=
tion.

Does anyone have something in this kind working ?

Thanks in advance
Matthias Gruber

-----------------------------------------------------------------------=
-------------

Dipl.-Inform. Matthias Gruber
MCNE(mult.), MCSE, CIP, IT-Project+
Bankhaus  B. Metzler seel. Sohn & Co. KGaA
++ Informationssysteme/Systemtechnik ++
Tel.:     +49 69 2104 4330
Fax:      +49 69 2104 4040
Gro=DFe Gallusstr. 18
60311 Frankfurt
MGruber@Metzler.com
=