Ad Widget

Collapse

Zabbix 6.4 and new SNMP walk discovery rule

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • OlaA
    Junior Member
    • Apr 2023
    • 4

    #1

    Zabbix 6.4 and new SNMP walk discovery rule

    Hi,

    I upgraded to Zabbix 6.4 to try out the new SNMP OID discovery way to bulk get SNMP described in this section of the documentation.
    4 Discovery of SNMP OIDs (zabbix.com)

    The documentation describes in a good way how to create the snmp item and the discovery rule using Dependent item​ and SNMP walk to JSON​ preprocessing.

    The problem I have is how to then create the item prototype for this rule.

    In the documentation there is just a single line that say:
    Item prototypes must be created as dependent item prototypes, using macros from the discovery rule.

    But I'm not able to figure out how to access the processed data from the rule​. If I select dependent item for the item prototype I need to select a master item. Here I can only select the walk[] item created. Is this correct? But how do I specify what specific OID I'm interested in as specified in the rule for LLD macro name in SNMP walk to JSON​ preprocessing​.

    If someone could help me figure this out I would be glad. None of the existing built-in templates use this new feature that I could see.
  • Answer selected by OlaA at 20-04-2023, 13:22.
    Ivo Schooneman
    Junior Member
    Zabbix Certified Specialist
    • Jan 2023
    • 3


    Took me a while to figure it out, but got some data coming in now...
    This blog was helpful: https://blog.zabbix.com/zabbix-6-4-is-out-now/25444/

    Step 1: make the item which will do the walk[] over your OIDs
    Step 2: make a discovery rule which uses the master item you just made, in pre-processing you add SNMP to Jsonpath with filenames {#IF.DESC} {#IF.IN.OCTETS} etc and the OID without the index.
    Step 3: make the item prototype, in pre-processing you use "snmp walk value" with parameters like: 1.3.6.1.2.1.2.2.1.10.{#SNMPINDEX}

    This way I got my template done, which makes use of the new way of working with snmp and master/Dependent items.

    Comment

    • OlaA
      Junior Member
      • Apr 2023
      • 4

      #2
      As a follow-up I was able to get the data I want using the legacy method described in documentation using discovery[] rule.

      But I'm still interested in how to use the new walk[] and SNMP walk to JSON​ method, as this utilize bulk get instead of individual snmp queries the legacy method use and should give better performance.

      Comment

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

        #3
        I don't have 6.4 to play with, but what is it that is missing from docs you linked? For me it seems pretty straightforward...

        Comment

        • Ivo Schooneman
          Junior Member
          Zabbix Certified Specialist
          • Jan 2023
          • 3

          #4

          Took me a while to figure it out, but got some data coming in now...
          This blog was helpful: https://blog.zabbix.com/zabbix-6-4-is-out-now/25444/

          Step 1: make the item which will do the walk[] over your OIDs
          Step 2: make a discovery rule which uses the master item you just made, in pre-processing you add SNMP to Jsonpath with filenames {#IF.DESC} {#IF.IN.OCTETS} etc and the OID without the index.
          Step 3: make the item prototype, in pre-processing you use "snmp walk value" with parameters like: 1.3.6.1.2.1.2.2.1.10.{#SNMPINDEX}

          This way I got my template done, which makes use of the new way of working with snmp and master/Dependent items.

          Comment

          • OlaA
            Junior Member
            • Apr 2023
            • 4

            #5
            Originally posted by Ivo Schooneman
            Took me a while to figure it out, but got some data coming in now...
            This blog was helpful: https://blog.zabbix.com/zabbix-6-4-is-out-now/25444/

            Step 1: make the item which will do the walk[] over your OIDs
            Step 2: make a discovery rule which uses the master item you just made, in pre-processing you add SNMP to Jsonpath with filenames {#IF.DESC} {#IF.IN.OCTETS} etc and the OID without the index.
            Step 3: make the item prototype, in pre-processing you use "snmp walk value" with parameters like: 1.3.6.1.2.1.2.2.1.10.{#SNMPINDEX}

            This way I got my template done, which makes use of the new way of working with snmp and master/Dependent items.
            Thank you, step 1 and 2 was fairly well described in the official documentation but your notes in step 3 are very valuable. I will try these out and report back. But to clarify, did you in step 3 set the item prototype as a dependent item and set master item to the one created in step 1?

            Comment


            • vanessa
              vanessa commented
              Editing a comment
              The official documentation doesn't mention how this is to be done at all. Zabbix very likely deliberately do this to sell support and lectures, and I personally think that it's very disingenuous.

              This is basically what the official documentation has to say in the article about walk[], and it also lacks the vital information we got from this thread.

              "Item prototypes must be created as dependent item prototypes, using macros from the discovery rule."
          • OlaA
            Junior Member
            • Apr 2023
            • 4

            #6
            I can report that using "snmp walk value" in item prototype was the way to get it working. Thanks for the nudge in the right direction.

            Comment

            • Ivo Schooneman
              Junior Member
              Zabbix Certified Specialist
              • Jan 2023
              • 3

              #7
              Took me some time as well, but the blog was helpful, and got it confirmed myself at the Benelux conference, where we had a workshop on bulk-snmp by Kaspars.

              Comment

              • vanessa
                Member
                • Oct 2024
                • 38

                #8
                Originally posted by Ivo Schooneman
                Took me a while to figure it out, but got some data coming in now...
                This blog was helpful: https://blog.zabbix.com/zabbix-6-4-is-out-now/25444/

                Step 1: make the item which will do the walk[] over your OIDs
                Step 2: make a discovery rule which uses the master item you just made, in pre-processing you add SNMP to Jsonpath with filenames {#IF.DESC} {#IF.IN.OCTETS} etc and the OID without the index.
                Step 3: make the item prototype, in pre-processing you use "snmp walk value" with parameters like: 1.3.6.1.2.1.2.2.1.10.{#SNMPINDEX}

                This way I got my template done, which makes use of the new way of working with snmp and master/Dependent items.
                I wonder what the point of extracting some of the values was then, if you need to extract them again with another preprocessing rule ...

                Comment

                • mariusl
                  Junior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Aug 2024
                  • 25

                  #9
                  Originally posted by vanessa

                  I wonder what the point of extracting some of the values was then, if you need to extract them again with another preprocessing rule ...
                  I wonder the same. The new way of doing this feels quite cumbersome, having to define the OIDs multiple times. I also had some issues with the master SNMP Walk item timing out because of the size (solution was obviously to increase the timeout threshold on the item). The problem with having one master item though is that the collection itself will take some time, potentially over 1 minute, which may be the required update interval for some of the OIDs.

                  Comment

                  Working...