Ad Widget

Collapse

Zabbix 3.0 SNMP trap trouble

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • artem
    Junior Member
    • Sep 2015
    • 6

    #1

    Zabbix 3.0 SNMP trap trouble

    Hello,

    I'm using perl receiver in order to convey snmp traps to zabbix. My snmptrapd.conf is as follows:

    Code:
    logoption f /var/log/snmptrap.log
    logoption s 1
    traphandle default /etc/zabbix/zabbix_trap_receiver.pl
    disableAuthorization yes
    perl do "/etc/zabbix/zabbix_trap_receiver.pl"
    Perl script variable is $SNMPTrapperFile = '/tmp/zabbix_traps.tmp';

    And related config for zabbix:

    Code:
    SNMPTrapperFile=/tmp/zabbix_traps.tmp
    StartSNMPTrapper=1
    The problem is traps are getting into /tmp/zabbix_traps.tmp, but I can't manage to see them in zabbix. Even when I use snmptrap.fallback key and log data type, there's nothing in zabbix log file.

    Any suggestions?
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    zabbix config do you have the snmp trapper process started?

    One quick thing to see if zabbix is looking is turn off the traps, delete the tmp file zabbix is supposed to read. At debug level 3 (which I run all the time) it will then give you an error every few minutes that the file doesn't exist. If you don't see that, something in zabbix is not looking for it.

    Comment

    • artem
      Junior Member
      • Sep 2015
      • 6

      #3
      Originally posted by Linwood
      zabbix config do you have the snmp trapper process started?

      One quick thing to see if zabbix is looking is turn off the traps, delete the tmp file zabbix is supposed to read. At debug level 3 (which I run all the time) it will then give you an error every few minutes that the file doesn't exist. If you don't see that, something in zabbix is not looking for it.
      Yes, the process is OK. After stopping snmptrapd and deleting trap file zabbix started to log "no such file". Moreover, after I've started snmptrapd zabbix logs unmatched traps. The issue is solved by deleting file and restarting snmptrapd. It looks like bug or some kind of specific order of operations.

      Thanks a lot!

      Comment

      • Linwood
        Senior Member
        • Dec 2013
        • 398

        #4
        It's a fragile process to get working in the first place, though once I got it working it has been stable. I never went back and tried to really figure out if the documentation was wrong, or I just couldn't read, or something else. THough I never did get the snmptt (whatever that was) "easy" way to work, only the perl receiver, but that's the better way anyway.

        Comment

        Working...