Ad Widget

Collapse

Dynamic Index, What am I doing wrong??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ro_yoshioka
    Member
    • May 2011
    • 33

    #1

    Dynamic Index, What am I doing wrong??

    Hi,

    I'm having some issues with dynamic indexes. In fac, I'm already using them like ifInOctets["index","ifAlias","KEYWORD"], and it is working fine to me. But I have some problems to get simple queue from Mikrotik. Follow the description.

    OID which has the name of queue:
    Code:
    snmpwalk -c public -v1 000.000.000.000 SNMPv2-SMI::enterprises.14988.1.1.2.1.1.2 |more
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.2.1 = STRING: "NAME1"
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.2.2 = STRING: "NAME2"
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.2.3 = STRING: "NAME3"
    And one of the data I need to get:
    Code:
    snmpwalk -c public -v1 000.000.000.000 SNMPv2-SMI::enterprises.14988.1.1.2.1.1.9 |more
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.9.1 = Counter64: 26431
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.9.2 = Counter64: 53287941
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.9.3 = Counter64: 12202378807
    So I used to make my SNMP OID like this in zabbix Item configuration:
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.9["index","SNMPv2-SMI::enterprises.14988.1.1.2.1.1.2","NAME2"]
    I'm using SNMPv1 Agent.

    But I'm getting this message:
    3331:20131008:114952.587 item [TLG - PPPoE Server:ifOutOctets_A] became not supported: Cannot find index [SNMPv2-SMI::enterprises.14988.1.1.2.1.1.2] of the OID [SNMPv2-SMI::enterprises.14988.1.1.2.1.1.9["index","SNM

    The log error is incomplete because I believe zabbix log has limitations of numbers of characters. But I past exactly as I get in zabbix_server.log.

    If I use just SNMPv2-SMI::enterprises.14988.1.1.2.1.1.9.2 I get the right data. But with fixed OID I will have problem in the future.

    Zabbix version: 2.0.8 and 2.0.9 (which I updated in order to solve the problem).
    OS Version: CentOS 6
    Mikrotik Version: CCR-1016-12G v6.4

    Can Anyone help me?
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    So that means in one case,
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.[2].1
    is the dynamic index [2]

    while in the other case
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.[9].1
    is the dynamic index [9]?

    Then your LLD rule needs to be defined as
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1

    and your item prototypes will be:
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.{#SNMPINDEX}.1
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.{#SNMPINDEX}.2
    SNMPv2-SMI::enterprises.14988.1.1.2.1.1.{#SNMPINDEX}.3

    and so on.

    Comment

    • ro_yoshioka
      Member
      • May 2011
      • 33

      #3
      Originally posted by steveboyson
      So that means in one case,
      SNMPv2-SMI::enterprises.14988.1.1.2.1.1.[2].1
      is the dynamic index [2]

      while in the other case
      SNMPv2-SMI::enterprises.14988.1.1.2.1.1.[9].1
      is the dynamic index [9]?

      Then your LLD rule needs to be defined as
      SNMPv2-SMI::enterprises.14988.1.1.2.1.1

      and your item prototypes will be:
      SNMPv2-SMI::enterprises.14988.1.1.2.1.1.{#SNMPINDEX}.1
      SNMPv2-SMI::enterprises.14988.1.1.2.1.1.{#SNMPINDEX}.2
      SNMPv2-SMI::enterprises.14988.1.1.2.1.1.{#SNMPINDEX}.3

      and so on.

      In fact my dynamic index is the last number (after 2, and 9), as this OID can't be translate, I suppose that:

      SNMPv2-SMI::enterprises.14988.1.1.2.1.1.2.[index] means queue name
      SNMPv2-SMI::enterprises.14988.1.1.2.1.1.9.[index] means queue Out
      SNMPv2-SMI::enterprises.14988.1.1.2.1.1.8.[index] means queue In


      In mikrotik I can print the OID Names, as follows

      Code:
      QUEUE 1
      name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.1
      bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.1 
      bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.9.1 
      packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.1 
      packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.1 
      queues-in=.1.3.6.1.4.1.14988.1.1.2.1.1.12.1 
      queues-out=.1.3.6.1.4.1.14988.1.1.2.1.1.13.1
      
      QUEUE 2
      name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.2 
      bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.2 
      bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.9.2 
      packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.2 
      packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.2 
      queues-in=.1.3.6.1.4.1.14988.1.1.2.1.1.12.2 
      queues-out=.1.3.6.1.4.1.14988.1.1.2.1.1.13.2
      
      ..... and go on....

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        I assume, the index following the dynamic index is the queue number?

        Then just define several LLD rules for each topic.

        LLD_for_name: 1.3.6.1.4.1.14988.1.1.2.1.1.2
        LLD will find .1, .2, .3, ...

        LLD_for_bytes-in: 1.3.6.1.4.1.14988.1.1.2.1.1.8
        LLD will find .1, .2, .3, ...

        and so on.

        Have you seen that?


        Import that MIB into /usr/share/snmp/mibs/ and do a "snmpwalk" against 1.3.6.1.4.1.14988

        Comment

        • steveboyson
          Senior Member
          • Jul 2013
          • 582

          #5
          Import that MIB on your zabbix server, of course.

          Oh, and don't forget to restart zabbix_agentd (if running) and zabbix_server afterwards.

          Comment

          • ro_yoshioka
            Member
            • May 2011
            • 33

            #6
            Hi steveboyson,

            I downloaded the file to my zabbix server, and this didn't make any effect. When I use snmpwalk, the data continue withou name, only numbers. And the Dynamic item continue with same problem.

            Comment

            • steveboyson
              Senior Member
              • Jul 2013
              • 582

              #7
              Then your MIB file is not on the correct place.

              Pls. try (on your zabbix server):
              "snmpwalk -O t -M all -v2c -c public your.server.ip.address 1.3.6.1.4.1.14988"

              It should give you at least OID descriptions.

              Code:
              mikrotikExperimentalModule MODULE-IDENTITY
                LAST-UPDATED "200404010000Z"
                ORGANIZATION "MikroTik"
                CONTACT-INFO "@mikrotik.com"
                DESCRIPTION ""
                REVISION "200404010000Z"
                DESCRIPTION ""
                ::= { mikrotik 1 }
              
              mikrotik OBJECT IDENTIFIER ::= { enterprises 14988 }
              mtXMetaInfo OBJECT IDENTIFIER ::= { mikrotikExperimentalModule 2 }
              mtXRouterOsGroups OBJECT IDENTIFIER ::= { mtXMetaInfo 1 }
              
              mtXRouterOs OBJECT IDENTIFIER ::= { mikrotikExperimentalModule 1 }
              mtxrWireless OBJECT IDENTIFIER ::= { mtXRouterOs 1 }
              mtxrQueues OBJECT IDENTIFIER ::= { mtXRouterOs 2 }
              mtxrHealth OBJECT IDENTIFIER ::= { mtXRouterOs 3 }
              mtxrLicense OBJECT IDENTIFIER ::= { mtXRouterOs 4 }
              You can see:
              enterprises.14988 = enterprises.mikrotik
              enterprises.14988.1 = enterprises.mikrotik.mikrotikExperimentalModule
              enterprises.14988.1.1 = enterprises.mikrotik.mikrotikExperimentalModule.mt XRouterOs
              enterprises.14988.1.1.2 = enterprises.mikrotik.mikrotikExperimentalModule.mt XRouterOs.mtxrQueues
              Last edited by steveboyson; 08-10-2013, 22:13. Reason: type mismatch

              Comment

              • steveboyson
                Senior Member
                • Jul 2013
                • 582

                #8
                Just to clarify, importing the MIB will not fix your LLD problems. But it gives more details on what zabbix is reading and helps on creating correct LLD rules.

                Comment

                Working...