Ad Widget

Collapse

Cannot receive traps on Zabbix trap server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabbix44
    Junior Member
    • Aug 2022
    • 4

    #1

    Cannot receive traps on Zabbix trap server

    Hi
    Details :
    snmptrapd AND zabbix trap service are up and running.

    1147 ? Ss 0:00 /usr/sbin/snmptrapd -Lsd -f
    1770 ? S 0:00 /usr/sbin/zabbix_server: snmp trapper [processed data in 0.000028 sec, idle 1 sec]

    Inside the zabbix server conf file and the perl script there is a map to SNMPTrapperFile (not inside the /tmp)
    $SNMPTrapperFile = '/var/log/traps/zabbix_traps.tmp';

    I've created a SNMP interface inside the frotend server, and also an item with "snmptrap.fallback" key.

    I send traps from the server itself (or from a remote host) :
    snmptrap -v 2c -c public 127.0.0.1 '' .1.3.6.1.6.3.1.1.5.3 .1.3.6.1.6.3.1.1.5.3 s "interfcae"

    I can see the traps arrived by using tcpdump utill.

    But the tmp file is just not created, also I cannot see any traps inside the UI

    What can I check more?

    Thanks

  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    You've provided good information about the environment, the problem, and what you've tried already, which is very good. Including what version of Zabbix you're using, what OS and version, and how Zabbix server was installed (traditional packages? from source? docker containers?) would also be useful information that may be relevant to debugging the problem.

    Is SELinux enabled on the Zabbix server? If it is, and the trapper file isn't in the expected place, it's possible that SELinux could be preventing it from being created.

    Alternately, what are the owner, group, and permissions on the /var/log/traps directory?

    Your /etc/snmp/snmptrapd.conf has been modified as described in the Zabbix SNMP Trap setup documentation, so that your perl script is executed when traps for that community are received? It should look something like:

    Code:
    authCommunity    execute   public
    perl do "/usr/libexec/monitoring/zabbix_trap_receiver.pl";
    though the path to the script and the script name will undoubtedly be different in your environment.

    Comment

    • zabbix44
      Junior Member
      • Aug 2022
      • 4

      #3
      Hi

      Indeed, it was the selinux that cause the problem.
      I will use this thread to ask another question regarding the traps -

      When I Configured an SNMP interface on 127.0.0.1 the Zabbix put by default port 161 as the "port of the interface".
      Now, it is well known that traps receive on port 162.
      So, regarding traps the "161" as no meaning, and for my opinion it is totally not intuitive and maybe even confusing . . .

      And generally speaking, is there any improvements regarding the 'traps' in the road map of Zabbix?
      Solarwinds is much more friendly for the end user . . .

      Thanks for your help


      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        for traps you can write whatever port you like there, data comes in through logfile anyway.. I don't see, why they need that snmp interface for traps at all..:P Probably some internal thing, that I am not able to understand ..

        Roadmap does not really specify anything special for SNMP.. https://www.zabbix.com/roadmap But you can submit your requests and get people to upvote those.. Maybe something will be developed, if there is enough interest...

        Comment

        Working...