Ad Widget

Collapse

SNMP traps presentation at GUI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manosnms
    Member
    • Jun 2020
    • 52

    #1

    SNMP traps presentation at GUI

    Hello,

    I have 2 issues.

    1. Even though i put MIB files under /usr/local/share/snmp/mibs (https://www.zabbix.com/documentation...ypes/snmp/mibs) it seems that Zabbix cannot translate the traps

    Click image for larger version

Name:	trap.JPG
Views:	1582
Size:	110.5 KB
ID:	404419

    2. Is it possible to have another view of the traps? e.g.

    Click image for larger version

Name:	trap_view.JPG
Views:	1391
Size:	93.2 KB
ID:	404420


    Thank you
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Originally posted by manosnms
    1. Even though i put MIB files under /usr/local/share/snmp/mibs (https://www.zabbix.com/documentation...ypes/snmp/mibs) it seems that Zabbix cannot translate the traps
    That's not Zabbix's fault, that's because snmptrapd isn't doing the translation.

    You need to modify your OS's snmp configuration to load the MIBs you need.

    You don't say what OS or version you're using, but if it's RHEL or a related distro, read the snmp.conf(5) man page and pay attention to the "MIB HANDLING" section.

    For my site, where the Zabbix server is currently on RHEL 7.x, I created the file /etc/snmp/snmp.local.conf and put several "mibs + MIBNAME" statements in it. Remember to restart snmptrapd after making any changes to snmp.conf, snmp.local.conf, or snmptrapd.conf.

    Comment

    • manosnms
      Member
      • Jun 2020
      • 52

      #3
      Hi,

      Is it possible to provide a simple example?

      e.g a few MIBs I have

      mibs + /usr/local/share/snmp/mibs/BGP4-MIB
      mibs + /usr/local/share/snmp/mibs/BRIDGE-MIB
      mibs + /usr/local/share/snmp/mibs/CISCO-BGP4-MIB
      mibs + /usr/local/share/snmp/mibs/CISCO-EIGRP-MIB
      mibs + /usr/local/share/snmp/mibs/CISCO-ENTITY-ASSET-MIB


      I have Centos7

      Thank you

      Comment

      • manosnms
        Member
        • Jun 2020
        • 52

        #4
        What I have

        [root@zabbix zabbix]# net-snmp-config --snmpconfpath
        /etc/snmp:/usr/share/snmp:/usr/lib64/snmp:/root/.snmp:/var/lib/net-snmp

        I put all of my mibs under /usr/share/snmp/mibs

        I created a file named snmp.local.conf and I added the below

        mibs +ALL

        so now when I restart snmptrapd

        I get the below

        HTML Code:
        [root@zabbix zabbix]# systemctl status snmptrapd -l
        ● snmptrapd.service - Simple Network Management Protocol (SNMP) Trap Daemon.
        Loaded: loaded (/usr/lib/systemd/system/snmptrapd.service; enabled; vendor preset: disabled)
        Active: active (running) since Fri 2020-07-03 12:50:55 EEST; 5min ago
        Main PID: 6915 (snmptrapd)
        Tasks: 1
        CGroup: /system.slice/snmptrapd.service
        └─6915 /usr/sbin/snmptrapd -On -Lsd -f
        
        Jul 03 12:56:00 zabbix snmptrapd[6915]: Cannot adopt OID in MPLS-MIB: mplsLspName ::= { mplsLspEntry 1 }
        Jul 03 12:56:00 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1
        Jul 03 12:56:02 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1
        Jul 03 12:56:02 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1
        Jul 03 12:56:02 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1
        Jul 03 12:56:03 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1
        Jul 03 12:56:03 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1
        Jul 03 12:56:03 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1
        Jul 03 12:56:04 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1
        Jul 03 12:56:09 zabbix snmptrapd[6915]: perl callback function 0x55fb6d8b28c0 returns 1

        HTML Code:
        [root@zabbix zabbix]# systemctl status snmptrapd -l
        ● snmptrapd.service - Simple Network Management Protocol (SNMP) Trap Daemon.
        Loaded: loaded (/usr/lib/systemd/system/snmptrapd.service; enabled; vendor preset: disabled)
        Active: active (running) since Fri 2020-07-03 12:50:55 EEST; 5min ago
        Main PID: 6915 (snmptrapd)
        Tasks: 1
        CGroup: /system.slice/snmptrapd.service
        └─6915 /usr/sbin/snmptrapd -On -Lsd -f
        
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityPathVectorLimit ::= { jnxMplsLdpEntityEntry 14 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityLabelRetentionMode ::= { jnxMplsLdpEntityEntry 13 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityLabelDistMethod ::= { jnxMplsLdpEntityEntry 12 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityInitSesThreshold ::= { jnxMplsLdpEntityEntry 11 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityHelloHoldTimer ::= { jnxMplsLdpEntityEntry 10 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityKeepAliveHoldTimer ::= { jnxMplsLdpEntityEntry 9 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityMaxPduLength ::= { jnxMplsLdpEntityEntry 8 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityUdpDscPort ::= { jnxMplsLdpEntityEntry 7 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityTcpDscPort ::= { jnxMplsLdpEntityEntry 6 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityOperStatus ::= { jnxMplsLdpEntityEntry 5 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityAdminStatus ::= { jnxMplsLdpEntityEntry 4 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityProtocolVersion ::= { jnxMplsLdpEntityEntry 3 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityIndex ::= { jnxMplsLdpEntityEntry 2 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityLdpId ::= { jnxMplsLdpEntityEntry 1 }
        Jul 03 12:56:33 zabbix snmptrapd[6915]: Cannot adopt OID in JUNIPER-MPLS-LDP-MIB: jnxMplsLdpEntityStatsEntry ::= { jnxMplsLdpEntityStatsTable 1 }


        Comment

        • manosnms
          Member
          • Jun 2020
          • 52

          #5
          any help would be great. thanks

          Comment

          • tim.mooney
            Senior Member
            • Dec 2012
            • 1427

            #6
            I've not seen that particular error ( "Cannot adopt OID" ) before, but some web searching turns up a number of matches for it. Based on a very quick glance at a couple of them, it seems like it may be some kind of dependency issue. You'll want to do some research on that error and look at some of the search results, to see if you arrive at the same conclusion.

            If it is a dependency error, it probably means that either you're missing some MIB files that other MIBs need or possibly they're getting loaded in the wrong order? Not sure, as again I haven't experienced this particular error.

            Comment

            • manosnms
              Member
              • Jun 2020
              • 52

              #7
              I don't get it.

              the perl file is working. the SNMPTrapperFile is working fine.

              an example is the below.


              HTML Code:
              17:28:53 2020/07/13 ZBXTRAP 10.13.5.21
              PDU INFO:
              notificationtype TRAP
              version 1
              receivedfrom UDP: [10.10.0.10]:58660->[10.10.0.2]:162
              errorstatus 0
              messageid 0
              community something
              transactionid 967
              errorindex 0
              requestid 1703803143
              VARBINDS:
              .1.3.6.1.2.1.1.3.0 type=67 value=Timeticks: (687914106) 79 days, 14:52:21.06
              .1.3.6.1.6.3.1.1.4.1.0 type=6 value=OID: .1.3.6.1.2.1.10.166.3.0.2
              .1.3.6.1.2.1.10.166.3.2.2.1.34.48559.1.1051328316. 1051328286 type=2 value=INTEGER: 1
              .1.3.6.1.2.1.10.166.3.2.2.1.35.48559.1.1051328316. 1051328286 type=2 value=INTEGER: 2
              .1.3.6.1.6.3.1.1.4.3.0 type=6 value=OID: .1.3.6.1.4.1.2636.1.1.1.2.21
              this is a CiscoIOSXRMplsTETunnelDown OID

              where do I see this trap in GUI? In Problems view I do not receive it. I want to see it even if Zabbix is not able to translate it (if we say that there is a misconficuration with MIB files)


              Thank you

              Comment

              • Hamardaban
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • May 2019
                • 2713

                #8
                You can see the contents of the trap in the "lastdata" section. Provided that you set everything up correctly. And yet-zabix is not engaged in formatting or converting snmp traps and stores them as text or string, cutting off what did not fit. You can configure formatting and conversion in snmptt.

                some links:
                https://www.zabbix.com/documentation...itemtypes/snmp
                https://www.zabbix.com/documentation...types/snmptrap.
                https://blog.zabbix.com/snmp-traps-in-zabbix/8210/
                https://blog.zabbix.com/zabbix-snmp-...gure-it/10345/
                Last edited by Hamardaban; 14-07-2020, 16:05.

                Comment

                • manosnms
                  Member
                  • Jun 2020
                  • 52

                  #9
                  I thought that I was able to see the traps in Problems section....where I have the severity......this is not possible?

                  So what do I see in Problems section? the polling from Zabbix to the elements?


                  Thank you!

                  Comment

                  • Hamardaban
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • May 2019
                    • 2713

                    #10
                    In the "problems" section, you can see the traps that triggered the trigger.

                    Comment

                    • manosnms
                      Member
                      • Jun 2020
                      • 52

                      #11
                      the traps that triggered the trigger ??? could you please explain this? are the traps that generated from the network elements and received by zabbix?
                      thank you

                      Comment


                      • Hamardaban
                        Hamardaban commented
                        Editing a comment
                        Read the information on the links I wrote earlier
                    • manosnms
                      Member
                      • Jun 2020
                      • 52

                      #12
                      I did have a quick look. even one of them was my basic help to configure it. even though it does not answer to my question

                      In the problem section are the traps that generated from the network elements and received by zabbix?


                      thank you for your support!

                      Comment

                      • Hamardaban
                        Senior Member
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • May 2019
                        • 2713

                        #13
                        The chain is as follows: network device - > receiver and handler of traps -> zabix data element --if the trigger is configured and it triggered—> event generation —> display in problems.

                        Comment

                        • manosnms
                          Member
                          • Jun 2020
                          • 52

                          #14
                          thank you. so my problem is somewhere in zabix data element --if the trigger is configured and it triggered—> event generation —> display in problems.

                          since i receive the traps and the script handles them

                          thank you once more

                          Comment

                          • tim.mooney
                            Senior Member
                            • Dec 2012
                            • 1427

                            #15
                            If you're looking for this trap to be identified as a problem, and therefore appear in the Problems display, you maybe should focus on the "if the trigger is configured and it triggered" part.

                            Just because Zabbix received an SNMP trap, it doesn't just assume that means there's a problem. You have to configure triggers (thresholds) for Zabbix to identify that "this trap is a problem", what its severity is, etc.

                            Comment

                            Working...