Doesn't output name when requested via snmp_exporter

26 views
Skip to first unread message

Andrew

unread,
Mar 8, 2023, 11:13:36 AM3/8/23
to Prometheus Users
Hi

If I make a query like this
snmpwalk -v 2c  -c Dorado60005H3E150 10.205.32.47 1.3.6.1.4.1.34774.4.1.23.4.8.1.2
I get this result
SNMPv2-SMI::enterprises.34774.4.1.23.4.8.1.2.4.57.57.49.54 = STRING: "HW03_SSD_ID424"
SNMPv2-SMI::enterprises.34774.4.1.23.4.8.1.2.4.57.57.49.55 = STRING: "HW03_SSD_ID425"
SNMPv2-SMI::enterprises.34774.4.1.23.4.8.1.2.4.57.57.49.56 = STRING: "HW03_SSD_ID426"

But if I do it via snmp_exporter I get the following
# HELP hwInfoLunName  - 1.3.6.1.4.1.34774.4.1.23.4.8.1.2
# TYPE hwInfoLunName gauge
hwInfoLunName{hwInfoLunID="0x3130303132",hwInfoLunName="0x485730335F5353445F4944333333"} 1
hwInfoLunName{hwInfoLunID="0x3130303137",hwInfoLunName="0x485730335F5353445F4944333335"} 1
hwInfoLunName{hwInfoLunID="0x3130303336",hwInfoLunName="0x485730335F5353445F4944333430"} 1

Maybe I have problems with snmp.yaml?

snmp.yml

Kordován Szabolcs

unread,
Mar 8, 2023, 2:57:08 PM3/8/23
to Prometheus Users
Hi,

Didi you use snmp_exporter's generator? It is recommended to use it. It reads the type of the oid's from the mib.
I think the type of this metric should be 'DisplayString'.
  - name: hwInfoLunName
    oid: 1.3.6.1.4.1.34774.4.1.23.4.8.1.2
    type:  DisplayString
    help: ' - 1.3.6.1.4.1.34774.4.1.23.4.8.1.2'
    indexes:
    - labelname: hwInfoLunID
      type: OctetString

Try it.

BR,

Andrew

unread,
Mar 9, 2023, 7:03:59 AM3/9/23
to Prometheus Users
Yes, thank you very much, it helped!

среда, 8 марта 2023 г. в 22:57:08 UTC+3, Kordován Szabolcs:
Reply all
Reply to author
Forward
0 new messages