Ad Widget

Collapse

Problem with item discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JosefMaly
    Junior Member
    • Oct 2022
    • 14

    #1

    Problem with item discovery

    Hello. I recently discovered problem with discovery in my self created zabbix templates. When I upgraded to version 6.2.0 and above, template for my routers suddenly stopped showing informations about interfaces and when I´m trying to test item it shows error: snmp_parse_oid(): cannot parse OID "1.3.6.1.2.1.2.2.1.5.{#SNMPINDEX}" for example. This is same for every item of interface discovery in this template. When i tried to swap it for my self created template for switches, there is everything working perfectly fine. All interfaces showed their stats, speeds, etc.

    Something similar happend when I tried to add discovery for windows services in my self created template for windows. But there is after test everything fine, but after given period of time nothing discovers. But everithing looks like nothing failed.

    Does anyone have this problem too​ and is there some fix for it?

    Thank you
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    #2
    How is your discovery configured? Is it working for the router?

    How is the item prototype for the interface speed configured in the discovery rule?

    Markku

    Comment


    • JosefMaly
      JosefMaly commented
      Editing a comment
      Discovery is set up absolutely same as is in premade templates for SNMP discovery. When I´m trying to test discovery rule itself, it finds all interfaces with no problem, but when I´m trying to test items alone, they all spit this error. It is not matter if it is speed or inbound or outbound errors, they say this cannot parse with their OID. And I´m sure, that this was working in version 6.0 but after upgrade to 6.2 It suddenly stopped discovering. And yes. All other discovery like for CPU, disk space is working just fine. And interesting thing. When I used a premade template for network devices by SNMP, it dicovered that intefaces just fine, but when I tried to test them, they said the same "cannot parse OID" error
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    #3
    Please don't use the Comment feature, it limits others' capability for quoting/liking/etc to your text.

    I get the same error when I try Test in the item prototype, that's normal. Where exactly do you use the Test function?

    Also note that nowhere from your post we can be sure which templates exactly are you referring to, because we don't know your upgrade path. That's why I asked you the exact configuration of the discovery rule.

    Markku

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1782

      #4
      FWIW, Test button works normally in my test environment with some "Interfaces SNMP" template and Zabbix 6.2.3:

      - pressed in item prototype in results the "snmp_parse_oid(): cannot parse OID "1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}".​" error as it should
      - pressed in an item results in a result to be shown, as it should.

      Markku

      Comment

      • JosefMaly
        Junior Member
        • Oct 2022
        • 14

        #5
        Click image for larger version

Name:	zabbix item discovery 1.png
Views:	2131
Size:	59.8 KB
ID:	453092 Click image for larger version

Name:	zabbix test discovery 1.png
Views:	2080
Size:	55.7 KB
ID:	453093 Click image for larger version

Name:	zabbix test item discovery 2.png
Views:	2037
Size:	72.0 KB
ID:	453094 Click image for larger version

Name:	zabbix test discovery 2.png
Views:	2100
Size:	141.8 KB
ID:	453095 I´m using myself created template for SNMP devices but with excatly the same vaules as are in precreated template "Network Generic Device SNMP​" because I cannot edit that premade templates and I wanted to add some other metrics and have them in one template. When I press test button in discovery rule alone, it find all interfacesss correctly, but when I press test button on items alone, they spit out that cannot parse error. I included pictures

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1782

          #6
          As mentioned, the Test button in item prototype should produce the error, no problem there, it is just a prototype, not an actual item anywhere.

          After that, you clicked Test in the discovery rule in the host, and that works, good. So the discovery rule works, it finds the interfaces.

          You said:

          template for my routers suddenly stopped showing informations about interfaces
          Could you rephrase what is your problem again? Please show some specific example as well, what do you see (or don't see).

          About the Test button, you can go to the items list of the router, open some item there, and click the Test button there. What do you get?

          Markku

          Comment

          • JosefMaly
            Junior Member
            • Oct 2022
            • 14

            #7
            Oh. Okay. I didnť know, that for item prototypes is this error OK. My problem is, that no interfaces are discovered at all. When I go to latest data of the host after given period of time to discover, not interfaces are shown. When I remove my template from host and replace him with that premade, interfaces are discovered immediately. My template is exacly rewritten from this premade template, so nothing should be wrong with it. And after that I give to my host back my template again, no intefaces are discovered

            Comment

            • Markku
              Senior Member
              Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
              • Sep 2018
              • 1782

              #8
              Ok, so you are saying that clicking Test in the discovery rule shows the interface data, but no interface items are created, and the problem started after upgrading to Zabbix 6.2.x.

              Is there any error shown in the Discovery list of the router?

              Is the Items list empty for the router even after running the discovery?

              Markku

              Comment

              • JosefMaly
                Junior Member
                • Oct 2022
                • 14

                #9
                No error is shown anywhere. One day it just said "This item is not discovered anymore and will be deleted in 29d..." And from that day is discovery of interfaces on this exact template not working anymore

                Comment

                • Markku
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                  • Sep 2018
                  • 1782

                  #10
                  Just to convince me please show the screenshot of the Discovery rules page of the router.

                  What else happened on that one day?

                  Markku

                  Comment

                  • Markku
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                    • Sep 2018
                    • 1782

                    #11
                    Also, how about sharing your template so that someone else can test the same as well?

                    Markku

                    Comment

                    • JosefMaly
                      Junior Member
                      • Oct 2022
                      • 14

                      #12
                      Nothing special. Just interfaces portion of that my template for routers stopped discovering. Same setup for interfaces in template for switches but stayed working to this day. You can that template yourself if you want
                      Click image for larger version

Name:	router dicovery 1.jpg
Views:	2105
Size:	84.5 KB
ID:	453107 Click image for larger version

Name:	router dicovery 2.jpg
Views:	1999
Size:	247.2 KB
ID:	453108

                      Comment

                      • Markku
                        Senior Member
                        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                        • Sep 2018
                        • 1782

                        #13
                        Thanks for that.

                        Your "Network interfaces" LLD rule has 10 filters that all use macros. However, those macros are not defined in the template. Are you sure your router has those macros defined correctly?

                        Markku

                        Comment

                        • Markku
                          Senior Member
                          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                          • Sep 2018
                          • 1782

                          #14
                          Another note, not related to the problem at hand, but saying it anyway: in the item prototype: "Status Operational of {#IFNAME} - {#SNMPVALUE}"
                          - there is no LLD macro called {#SNMPVALUE} in your discovery rule
                          - you are using "ifOperstatus" in the SNMP OID instead of the numeric value -> ensure that your Zabbix server has the correct MIB file installed (just something that you need to remember later if using the template somewhere else)​

                          Markku

                          Comment

                          • JosefMaly
                            Junior Member
                            • Oct 2022
                            • 14

                            #15
                            But I have template with exactly same settings for switches too, and when I´m using that switch template for routers, then everything works perfectly fine. Sending switch template for comparison
                            Attached Files

                            Comment

                            Working...