Wednesday, April 01, 2009

Zabbix trapper

Zabbix is a great tool, I'm currently trying to put in place, the snmp trap management. I have followed the manual for the installation, but I have seen that the script snmptrap.sh is not complete.

For my version (1.6.2), there are some missing parameters as -z -k -o etc. You need to update the script. The recommended solution is certainly to put at the last line a "echo" and redirect the ouput to a file to see if the zabbix script is called by snmptrapd, and if the new command is well builded.

echo $ZABBIX_SENDER $ZABBIX_SERVER $ZABBIX_PORT $HOST $KEY "str" /tmp/snmpresult.txt

When you have the result in snmpresult.txt, you can modify and add the missing parameters.

$ZABBIX_SENDER -z $ZABBIX_SERVER -p $ZABBIX_PORT -s $HOST -k $KEY -o "$str"

The best solution came from Pierky (http://pierky.wordpress.com/2009/01/30/zabbix-snmp-traps-mapped-to-the-right-host/).

1 comment:

Anonymous said...

Hi Gregory, thanks for your citation :) I like Zabbix too, it's a good opensource solution for NMS.

I'll post a new Zabbix script on my blog as soon as possible; it's about Cisco CB-QoS SNMP monitoring... stay tuned :)