Ad Widget

Collapse

Problem getting information in zabbix Latest data for snmp trap.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anton Semashka
    Junior Member
    • Jan 2025
    • 4

    #1

    Problem getting information in zabbix Latest data for snmp trap.

    Hello everyone! Has anyone encountered a problem with getting information about snmp trap in Latest data?

    I set up snmp trap in zabbix using a guide with a pl script. When I send a test message "snmptrap -v 2c -c linux localhost '' SNMPv2-MIB::snmpMIB IF-MIB::linkDown s ens3", then as expected I get a message in the snmptrap.log and the latest data in zabbix.

    But when testing and sending from the device, I get information in snmptrap.log and zabbix.log, but not in the latest data inside zabbix. What could be the problem?

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

    #2
    Item config?

    Comment

    • Anton Semashka
      Junior Member
      • Jan 2025
      • 4

      #3
      In the settings, I disabled the community to accept all traps and configured the item host as follows:
      Click image for larger version

Name:	Снимок экрана 2025-03-18 211224.png
Views:	97
Size:	31.4 KB
ID:	500745
      Attached Files

      Comment

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

        #4
        https://www.zabbix.com/documentation...types/snmptrap Configuring SNMP traps


        This item type requires the following frontend configuration.

        1. Create an SNMP interface for your host
        • In Data collection > Hosts, create/edit the host, and in the Interfaces field, add the interface type "SNMP", specifying the IP or DNS address.

          The address from each received trap will be compared to the IP and DNS addresses of all SNMP interfaces to find the corresponding hosts.
        So your testing from your zabbix server works probbly because of 127.0.0.1...

        and fallback does not catch those coming from outside... (That interface is 127.0.0.1 at the moment)
        snmptrap.fallback
        Catches all SNMP traps that were not caught by any of the snmptrap[] items for that interface.

        you need to create a host with the correct IP/DNS in interface config...

        Comment

        • Anton Semashka
          Junior Member
          • Jan 2025
          • 4

          #5
          I need to set up a host for the zabbix server in the interfaces not 127.0.0.1, but its address looking into the network?

          Or create a host with ip from which traps are sent?

          Comment

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

            #6
            Originally posted by Anton Semashka

            Or create a host with ip from which traps are sent?
            Thats what I said...

            Comment

            • Anton Semashka
              Junior Member
              • Jan 2025
              • 4

              #7
              Thank you. It actually worked. There was probably a mistake in the instructions.

              Comment

              Working...