A
A
anton13ms2019-10-24 12:41:35
Computer networks
anton13ms, 2019-10-24 12:41:35

How to force Zabbix to process non-standard SNMP Traps?

To be honest, I'm not sure if this is a non-standard Trap, we are talking about SNMP traffic received from a Moxa 5150 device (interface converter).
What I have come to at the moment:
1. Moxa sends SNMP Traps, and linux (on which Zabbix is ​​based) receives them, this is evidenced by the log from the file /var/log/zabbix/snmptrapfmt.log
5db1716037edc139017956.png
2. As I learned from the Internet sources:
There are three options for configuring zabbix to receive snmp traps.
a) SNMPTT (SNMP Trap Translator)
b) Perl script
c) Bash script and zabbix_sender
But which one is right for me? I haven't decided on this yet.
3. Also, as far as I know, Zabbix can process any log files and issue events on them ... That is, the idea immediately arises to process the snmptrapfmt.log file, but I'm not sure if this is the right thing to do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
iddqda, 2019-10-24
@iddqda

I do it like this
1. in snmptrapd I write the OID of the trap that I want to catch and process and the path to the handler
like this:

traphandle .1.3.6.1.4.1.9.9.315.0.0.1 /etc/zabbix/externalscripts/traphandlers/cisco-psec-traphandler.py
traphandle .1.3.6.1.4.1.9.9.548.0.1.1 /etc/zabbix/externalscripts/traphandlers/cisco-psec-traphandler.py

2. I write handlers in python. even my grandmother doesn't write on pearl anymore.
3. in Zabbix I create an item of type zabbix_trapper on the host that I monitor, more precisely in the template, which I then hang on the host. 4. I call zabbix_sender
from the handler itself, which sends the desired value to the desired host by the key of the item created in the 3rd paragraph, and as for reading the log, someone should do this. in the case of server monitoring, the servers themselves do this through an agent, and who will do it for your piece of iron?

K
kisaa, 2019-10-24
@kisaa

The instructions are quite sensible, at what step do you encounter difficulties?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question