Ad Widget

Collapse

[Zabbix 3.4 - Ubuntu] SNMP traps not logging

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kasik
    Member
    • Aug 2017
    • 30

    #1

    [Zabbix 3.4 - Ubuntu] SNMP traps not logging

    Hi guys,
    i have a problem with SNMP traps to get them into tmp log and into zabbix.
    I set it up as in documentation using snmptt without perl. and even when i have set log file to be /tmp/zabbix_traps.tmp in zabbix_server conf and in snmptt too i just don't get any but when i send test trap from monitored server with tcpdump -i xxx port 162 i can see that i recieve it... Any idea where is the problem? i even checked if services is running and modified chmod on log file to 777... please help
    Last edited by kasik; 19-09-2017, 09:43.
  • kasik
    Member
    • Aug 2017
    • 30

    #2
    update

    any ideas ?

    Comment

    • kasik
      Member
      • Aug 2017
      • 30

      #3
      Resolved

      So i found solution with this command:
      snmptrapd -A -Lf /tmp/snmptrapd.log

      and it showed me this:
      NET-SNMP version 5.7.3 AgentX subagent connected
      couldn't open udp:162 -- errno 98 ("Address already in use")


      so i reconfigures snmpd.conf where i changed used ports and restarted service
      then again used first command and in log i saw its connected so i send traps and now they are in tmp log :-)

      Comment

      • Gege
        Junior Member
        • Sep 2017
        • 7

        #4
        same symptom, same methos, other reason

        Thank you, Kasik for this post. I had the same problem of not receiving any trap.
        I used the same command

        snmptrapd -A -Lf /tmp/snmptrapd.log

        and found in snmptrapd.log that snmptrapd would not receive any trap as long as there would not be an access method defined in snmptrapd.conf. So I opted for the fast method and decided to removed the access method by inserting:

        disableAuthorization yes

        in snmptrapd.conf

        I now receive everything,

        following zabbix documentation I attempted to test the configuration using zabbix_sender, but it was not part of the initial installation. It was not either installed by zabbix-agent installation. the right way to do it is

        apt-get install zabbix-sender (with a - not a _)

        Comment

        Working...