Ad Widget

Collapse

Snmp index in item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fabien
    Junior Member
    • Feb 2014
    • 3

    #1

    Snmp index in item

    Hello,
    I am trying to graph CPU utilization in this case I have 2 CPUs

    The documentation is giving the following example
    ifInOctets["index","ifDescr","GigabitEthernet0/1"]

    I tried the following syntax :
    .1.3.6.1.4.1.22610.2.4.1.3.2.1.3["index",".1.3.6.1.4.1.22610.2.4.1.3.2.1.1"]
    It didn't work.

    Any idea how to do it ?

    $ snmpwalk -c public -v2c 192.168.59.107 .1.3.6.1.4.1.22610.2.4.1.3.2
    SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.1.0 = INTEGER: 0
    SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.1.1 = INTEGER: 1
    SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.2.0 = STRING: "5"
    SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.2.1 = STRING: "4"
    SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.3.0 = INTEGER: 5
    SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.3.1 = INTEGER: 4
    SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.4.0 = INTEGER: 1
    SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.4.1 = INTEGER: 0
  • pc99096
    Senior Member
    • Oct 2011
    • 193

    #2
    this is how i am doing it, it might not be the most elegant solution, but it works for me

    snmpwalk -c public -v2c 192.168.59.107 -> get the list of possible items
    snmpwalk -c public -v2c 192.168.59.107 -On -> same, but with OID instead of name

    compare those 2 lists to get the name-OID relation
    find your item you want to monitor, find the OID for it

    create a new item in zabbix:
    name - anything
    type - snmp agent
    key - anything
    snmp OID - your OID from snmpwalk
    the rest should be clear

    Comment

    • Fabien
      Junior Member
      • Feb 2014
      • 3

      #3
      snmp index

      Hello
      Thank you for your answer.
      I am probably missing something, I would like to create at the end a graph for each cpu automatically.
      In my example I have 2 cpus but some equipments have 24 cpus.
      I cannot create an item for each cpu.index.
      In my case for the snmp oid I have :
      .1.3.6.1.4.1.22610.2.4.1.3.2.1.3.index
      index is from 0 to 24.

      How can I achieve it ?
      How can I have on the same graph all my cpu curves ?

      Best regards

      Fabien

      Comment

      • pc99096
        Senior Member
        • Oct 2011
        • 193

        #4
        i am afraid you will have to do it for each cpu
        then you can create one single graph with all 2-24 items

        Comment

        • steveboyson
          Senior Member
          • Jul 2013
          • 582

          #5
          I wrote a custom LLD for this type of SNMP queries which have two changing indexes.

          usage:
          Code:
          ./LLD_SNMP host=myhost.domain key=CPQIDA-MIB::cpqDaPhyDrvLocationString addindex
          The "addindex" parameter is optional, also "debug" is optional to show debug output



          Output: pls. see "LLD_SNMP_testoutput.txt"

          In your example, you would specify
          Code:
          key=SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1
          and omit "addindex"

          Then, you create your prototype items which following SNMP OID:
          SNMPv2-SMI::enterprises.22610.2.4.1.3.2.1.{#INDEX}.{#SUBI NDEX}
          as these are the entries generated by the LLD script.

          Comment

          Working...