Ad Widget

Collapse

can I get the key name from an oid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerrysu1981
    Junior Member
    • Nov 2018
    • 4

    #1

    can I get the key name from an oid

    We have a device the can send the temperature to zabbix via snmp, we get the oid (temperature vaule) from the mib file which sent from the device vendor.
    and we able the get the temperature by snmpwalk using that oid. but if I need add item on zabbix, that need key name which I dont have, (and vendor doesn't know too )
    can I get the key name from an oid or can I get it from other way?
    please check the details form attachment. thanks

    Attached Files
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Please freely set names that do not conflict with other item's key.
    If the device vendor names the OID with an alphabetic character string, you can also match it.

    And, I think that OID needs to be specified as follows.
    .1.3.6.1.4.1.34672.20.1.3.1.1.1.0

    Comment

    • viktorkho
      Member
      • Jul 2013
      • 90

      #3
      UPD
      First of all, the Item Key is just a UTF-string, unique within a single host. See Item key format in Zabbix Documentation.

      Good practice is to use OID's literal name from MIB. You can extract it from the MIB-file provided by device vendor.

      Code:
      $ snmptranslate -m .snmp/mibs/UPS-MIB 1.3.6.1.2.1.33.1.2.5
      UPS-MIB::upsBatteryVoltage
      By the way, you can store your MIB-files in "/usr/share/snmp/mibs/" and "service zabbix-server restart" to allow Zabbix translate literal OIDs himself. See example from our Zabbix below.

      Click image for larger version  Name:	Снимок экрана от 2018-11-13 14:40:13.png Views:	1 Size:	9.8 KB ID:	368937

      Hint:
      You can also extract all of existing OIDs from your MIB wih snmptranslate:

      Code:
      $ snmptranslate -Tz -m .snmp/mibs/UPS-MIB
      ...
      "upsBattery"                    "1.3.6.1.2.1.33.1.2"
      "upsBatteryStatus"                      "1.3.6.1.2.1.33.1.2.1"
      "upsSecondsOnBattery"                   "1.3.6.1.2.1.33.1.2.2"
      "upsEstimatedMinutesRemaining"                  "1.3.6.1.2.1.33.1.2.3"
      "upsEstimatedChargeRemaining"                   "1.3.6.1.2.1.33.1.2.4"
      "upsBatteryVoltage"                     "1.3.6.1.2.1.33.1.2.5"
      "upsBatteryCurrent"                     "1.3.6.1.2.1.33.1.2.6"
      "upsBatteryTemperature"                 "1.3.6.1.2.1.33.1.2.7"
      ...
      Last edited by viktorkho; 13-11-2018, 10:57.

      Comment

      • jerrysu1981
        Junior Member
        • Nov 2018
        • 4

        #4
        I use a unique string on key, but still not work. check my configration via attachment
        Attached Files

        Comment

        • viktorkho
          Member
          • Jul 2013
          • 90

          #5
          But..
          your first question was:
          ... but if I need add item on zabbix, that need key name which I dont have, (and vendor doesn't know too )
          can I get the key name from an oid or can I get it from other way?
          And now you say that it "..still not work"

          Ok, if it is still relevant..
          • change Information type of Item to "Numeric (float)" bacause you have dotted number in snmpget output (if you use zabbix version before 3.x you will get UNSUPPORTED item error)
          • show Item status in "Hosts > <your host> > Items" page Does it have any errors in Info column?

          Comment

          Working...