Ad Widget

Collapse

SNMP Setup on zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maarguello
    Junior Member
    • Apr 2023
    • 19

    #1

    SNMP Setup on zabbix

    Hi guys.
    I new with zabbix, not sure how to works the snmp items

    Somebody can help me with any advice on how to created the items to zabbix to get snmp values.

    I want to get this values

    Click image for larger version

Name:	image.png
Views:	409
Size:	14.0 KB
ID:	471692

    this is my setup using another tool, but to sure how put these on Zabbix.

    [[inputs.snmp]]
    [[inputs.snmp.field]]
    name = "sysName"
    oid = ".1.3.6.1.2.1.1.5.0"
    is_tag = true​

    [[inputs.snmp.table]]
    name = "printer"
    inherit_tags = [ "sysName" ]

    [[inputs.snmp.table.field]]
    name = "prtMarkerSuppliesDescription"
    oid = ".1.3.6.1.2.1.43.11.1.1.6.1"
    is_tag = true

    [[inputs.snmp.table.field]]
    name = "prtMarkerSuppliesLevel"
    oid = ".1.3.6.1.2.1.43.11.1.1.9.1"

    [[inputs.snmp.table.field]]
    name = "prtMarkerSuppliesMaxCapacity"
    oid = ".1.3.6.1.2.1.43.11.1.1.8.1"​
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #2
    You should check Zabbix documentation for SNMP items.

    Comment

    • maarguello
      Junior Member
      • Apr 2023
      • 19

      #3
      Thanks that helped to lot.

      name = "prtMarkerSuppliesDescription"
      oid = ".1.3.6.1.2.1.43.11.1.1.6.1"
      is_tag = true

      name = "prtMarkerSuppliesLevel"
      oid = ".1.3.6.1.2.1.43.11.1.1.9.1"

      name = "prtMarkerSuppliesMaxCapacity"
      oid = ".1.3.6.1.2.1.43.11.1.1.8.1"

      after read all I still not clear on how to work the snmp walk for zabbix

      I'm adding an item to get description and values

      Click image for larger version

Name:	image.png
Views:	299
Size:	11.0 KB
ID:	472112
      Click image for larger version

Name:	image.png
Views:	294
Size:	16.2 KB
ID:	472113Click image for larger version

Name:	image.png
Views:	281
Size:	18.5 KB
ID:	472114​No sure on how to create indivuals items for this walk.
      I'm getting all in the same item

      any other advice?​

      Comment

      • maarguello
        Junior Member
        • Apr 2023
        • 19

        #4
        I was able to create a discovery rule to get the values and description.

        I would like to devide these item since prototype.

        Click image for larger version

Name:	image.png
Views:	288
Size:	23.0 KB
ID:	472123
        My calculated prototype item does not work, it is possible to make this using prototype?



        Click image for larger version

Name:	image.png
Views:	291
Size:	14.5 KB
ID:	472124


        Click image for larger version

Name:	image.png
Views:	281
Size:	20.1 KB
ID:	472125Click image for larger version

Name:	image.png
Views:	284
Size:	52.1 KB
ID:	472127​​​
        Attached Files

        Comment

        • vijayk
          Senior Member
          • May 2023
          • 305

          #5
          Originally posted by maarguello
          I was able to create a discovery rule to get the values and description.

          I would like to devide these item since prototype.

          Click image for larger version

Name:	image.png
Views:	288
Size:	23.0 KB
ID:	472123
          My calculated prototype item does not work, it is possible to make this using prototype?



          Click image for larger version

Name:	image.png
Views:	291
Size:	14.5 KB
ID:	472124


          Click image for larger version

Name:	image.png
Views:	281
Size:	20.1 KB
ID:	472125Click image for larger version

Name:	image.png
Views:	284
Size:	52.1 KB
ID:	472127​​​
          As understand you want the calculation of supplies in percentage right? As error shows item does not exist.

          Does you items which are used in the calculation return numeric values?

          Comment

          • maarguello
            Junior Member
            • Apr 2023
            • 19

            #6
            Hi

            Yes it is right.

            they return numeric values.

            Click image for larger version

Name:	image.png
Views:	275
Size:	17.9 KB
ID:	472202Click image for larger version

Name:	image.png
Views:	276
Size:	15.5 KB
ID:	472203

            so What I want is:

            percentSupplies[{#IFDESCR}] = last(supplieslevel[{#IFDESCR}]) / last(suppliescapacity[{#IFDESCR}])​​

            Comment

            • maarguello
              Junior Member
              • Apr 2023
              • 19

              #7
              **Feedback**

              I just update formula on item prototype to calculate the % of used for supplies.



              Click image for larger version

Name:	image.png
Views:	291
Size:	18.8 KB
ID:	472224

              ​but, I'm getting this error.. any help?

              Click image for larger version

Name:	image.png
Views:	269
Size:	24.0 KB
ID:	472225

              Comment

              • markfree
                Senior Member
                • Apr 2019
                • 868

                #8
                Zabbix uses dynamic indexes from the "walk" item and they already use the "{#SNMPINDEX}" macro.
                I suggest you to change the "{#SNMPINDEX}" field name from your preprocessing to something else.

                Looking at the calculated item formula, it seems correct to me, but a bit hard to read.

                Perhaps your "Supplies Capacity" calculated item could be like this:
                Code:
                (last(//supplieslevel[{#IFDESCR}]) * 100)
                /
                last(//suppliescapacity[{#IFDESCR}])

                Comment

                • maarguello
                  Junior Member
                  • Apr 2023
                  • 19

                  #9
                  :-(

                  I'm still having issues, I dont know what more to do .





                  This is my descovery rule

                  Click image for larger version

Name:	image.png
Views:	272
Size:	18.3 KB
ID:	472716


                  I just have 3 items prototypes:


                  1 item prototype

                  Click image for larger version

Name:	image.png
Views:	262
Size:	24.4 KB
ID:	472717


                  2. item prototype

                  Click image for larger version

Name:	image.png
Views:	262
Size:	24.2 KB
ID:	472718​​​

                  ​​

                  3. calculate item:


                  Click image for larger version

Name:	image.png
Views:	255
Size:	26.5 KB
ID:	472719


                  Everything looks good the only problem is I getting all in the string so the calculated operation

                  Cannot evaluate expression: left operand "supplieslevel[ADF Kit]" is not a numeric value for operator at "/("suppliescapacity[ADF Kit]")"


                  I'm new working with zabbix so I'm not familiar with some process, any other advice can help

                  Comment

                  • markfree
                    Senior Member
                    • Apr 2019
                    • 868

                    #10
                    It appears that you are continuing to enclose the functions within quotation marks in your calculated item. Why?
                    Have you experimented with the suggested formula?

                    Comment

                    • maarguello
                      Junior Member
                      • Apr 2023
                      • 19

                      #11
                      (ñ_ñ) sorry I made a mistake, I forgot add the last(

                      after added it works, thanks for help on my issue.
                      Click image for larger version

Name:	image.png
Views:	250
Size:	29.2 KB
ID:	472909

                      Click image for larger version

Name:	image.png
Views:	239
Size:	23.1 KB
ID:	472908

                      Comment

                      Working...