Zabbix server 3 : Using SNMP trap for monitoring specific SNMP OID item

anoop.babu picture anoop.babu · Apr 1, 2016 · Viewed 8.3k times · Source

In Zabbix Server 3, I have a linux host monitored through SNMP. The SNMP OID of the monitored MIB is as below:

SNMPv2-SMI::enterprises.94.7.1.4.2.1.5.1 = STRING: "CLUSTER STARTED (RESTARTED)"

I have configured this SNMP OID to be monitored for every 10 minutes. The Zabbix server is sending a SNMP get-request and the linux host replies back. The timestamp is updated in this case in Zabix>Monitoring>Latest Data section of Zabbix dashboard

Zabbix monitor item configuration

I also have an SNMP trap defined for this event. enter image description here

I restarted the cluster in the linux host, which triggered an SNMP trap message to zabbix and the event is captured in /var/log/zabbix/snmptrapfmt.log of zabbix server. But the Zabix>Monitoring>Latest Data section of Zabbix dashboard still has old timestamp for latest data. The new value is not updated from SNMP trap. Is there any separate configuration needed for this?

I am using zabbix appliance 3 as zabbix server

Answer

Richlv picture Richlv · Apr 11, 2016

The first item you showed, the one that polls SNMP, should not be relevant for trap processing.

Regarding the second item (snmptrap), make sure you have started SNMP trapper (StartSNMPTrapper parameter in the server configuration file). Also check that Zabbix server points at the location where you traps are written with the parameter SNMPTrapperFile. If all that is configured, check the server log - if a trap is written there, it was not matched to your item - in that case, check your regexp against the trap data and make sure the IP address Zabbix sees the trap from matches the SNMP interface address for that item.