Ad Widget

Collapse

Dynamic indexes double query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michu162
    Junior Member
    • Dec 2010
    • 4

    #1

    Dynamic indexes double query

    Hi.
    I'm traing to add item with dynamic index:
    ifInOctets["index","ifDescr","xe-0/0/4"]
    but zabbix send two queries:

    12:39:58.231322 IP db-zabbix18.xxx.44527 > 10.5.1.200.snmp: C=xxx$ GetRequest(31) interfaces.ifTable.ifEntry.ifDescr.510
    12:39:58.232434 IP db-zabbix18.xxx.44527 > 10.5.1.200.snmp: C=xxx$ GetRequest(31) interfaces.ifTable.ifEntry.ifInOctets.510
    12:40:28.771195 IP db-zabbix18.xxx.30295 > 10.5.1.200.snmp: C=xxx$ GetRequest(31) interfaces.ifTable.ifEntry.ifDescr.510
    12:40:28.772190 IP db-zabbix18.xxx.30295 > 10.5.1.200.snmp: C=xxx$ GetRequest(31) interfaces.ifTable.ifEntry.ifInOctets.510
    12:40:58.258003 IP db-zabbix18.xxx.35371 > 10.5.1.200.snmp: C=xxx$ GetRequest(31) interfaces.ifTable.ifEntry.ifDescr.510
    12:40:58.259004 IP db-zabbix18.xxx.35371 > 10.5.1.200.snmp: C=xxx$ GetRequest(31) interfaces.ifTable.ifEntry.ifInOctets.510

    instead of one query when i'm using OID:

    12:42:32.078643 IP db-zabbix18.xxx.55015 > 10.5.1.200.snmp: C=xxx$ GetRequest(32) 31.1.1.1.6.510
    12:43:02.899917 IP db-zabbix18.xxx.26142 > 10.5.1.200.snmp: C=xxx$ GetRequest(32) 31.1.1.1.6.510
    12:43:32.678200 IP db-zabbix18.xxx.49751 > 10.5.1.200.snmp: C=xxx$ GetRequest(32) 31.1.1.1.6.510
    12:44:02.499232 IP db-zabbix18.xxx.43107 > 10.5.1.200.snmp: C=xxx$ GetRequest(32) 31.1.1.1.6.510

    Is possible to use dynamic indexes without additional queries?
    Version Zabbix 1.8.1
    Last edited by michu162; 21-12-2010, 14:29.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    The only way to prevent that would be to cache the query for a specified period of time. Otherwise you must do two queries, as the first query determines what the OID of the value you are looking for is, and the second actually queries the OID you want. Check the support system and add a ticket in Zbx-next if one does not already exist (https://support.zabbix.com).
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • michu162
      Junior Member
      • Dec 2010
      • 4

      #3
      Dynamic indexes double query

      So, how can I configure zabbix or item to cache this queries once a hour?

      Comment

      • michu162
        Junior Member
        • Dec 2010
        • 4

        #4
        Dynamic indexes double query

        Can anybody help me?

        Comment

        • michu162
          Junior Member
          • Dec 2010
          • 4

          #5
          Dynamic indexes double query

          Please help me

          Comment

          • nelsonab
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2006
            • 1233

            #6
            I don't know how zabbix does things in the SNMP code, but if it is looking things up twice now then you could perhaps write an external program which updates your items via the API. Your external script would query the SNMP device in question and then push the OID into the item. You would then run your script via a cron job or something similar.
            RHCE, author of zbxapi
            Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
            Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

            Comment

            Working...