--- SSD status and wear level information --
hcpSsdNodeTable OBJECT-TYPE
SYNTAX SEQUENCE OF HcpSsdNodeTableEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Table of SSDs in the HCP system nodes."
::= { hcpNodes 9 }
-- node SSD table row declaration
hcpSsdNodeTableEntry OBJECT-TYPE
SYNTAX HcpSsdNodeTableEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Information about each SSD."
INDEX { nodeNumber }
::= { hcpSsdNodeTable 1 }
-- node SSD table row syntax
HcpSsdNodeTableEntry ::=
SEQUENCE {
ssdNodeNumber INTEGER,
ssdEnclosure DisplayString,
ssdSlot INTEGER,
ssdModel DisplayString,
ssdStatus DisplayString,
ssdWear INTEGER,
ssdThreshold INTEGER,
ssdConfigThreshold INTEGER,
ssdHealth DisplayString
}
The generated config creates a metric for the snmp.yml like this
- name: ssdStatus
oid: 1.3.6.1.4.1.116.5.46.1.9.1.5
type: DisplayString
help: Current status of the SSD - 1.3.6.1.4.1.116.5.46.1.9.1.5
indexes:
- labelname: nodeNumber
type: gauge
SNMP walk metrics look like this
HCP-MIB::ssdStatus.110.3 = STRING: online
HCP-MIB::ssdStatus.110.4 = STRING: online
HCP-MIB::ssdStatus.110.5 = STRING: online
HCP-MIB::ssdStatus.110.6 = STRING: online
HCP-MIB::ssdStatus.110.7 = STRING: online
HCP-MIB::ssdStatus.110.8 = STRING: online
This doesn't work because the index of the table is the node number and it just creates duplicate metrics. I can't do a lookup on anything else in that table, the only way I've been able to remedy it is manually add a label that makes the metrics unique into the snmp.yml config like this
- name: ssdStatus
oid: 1.3.6.1.4.1.116.5.46.1.9.1.5
type: DisplayString
help: Current status of the SSD - 1.3.6.1.4.1.116.5.46.1.9.1.5
indexes:
- labelname: nodeNumber
type: gauge
- labelname: ssdSlot
type: gauge
My question is, is there a way to create a valid generator config on devices that return multiple entries in a table that use a non unique index?
The generator config creates
- name: ssdStatus
oid: 1.3.6.1.4.1.116.5.46.1.9.1.5
type: DisplayString
help: Current status of the SSD - 1.3.6.1.4.1.116.5.46.1.9.1.5
indexes:
- labelname: nodeNumber
type: gauge
This causes duplicate metrics because its not unique, the snmpwalk for the device looks like this
HCP-MIB::ssdStatus.110.3 = STRING: online
HCP-MIB::ssdStatus.110.4 = STRING: online
HCP-MIB::ssdStatus.110.5 = STRING: online
HCP-MIB::ssdStatus.110.6 = STRING: online
HCP-MIB::ssdStatus.110.7 = STRING: online
HCP-MIB::ssdStatus.110.8 = STRING: online
HCP-MIB::ssdStatus.110.9 = STRING: online
HCP-MIB::ssdStatus.110.10 = STRING: online
HCP-MIB::ssdStatus.110.11 = STRING: online
HCP-MIB::ssdStatus.110.12 = STRING: online
HCP-MIB::ssdStatus.111.1 = STRING: online
HCP-MIB::ssdStatus.111.2 = STRING: online
The only way I've been able to get around it is manually editing the snmp.yml to add
- name: ssdStatus
oid: 1.3.6.1.4.1.116.5.46.1.9.1.5
type: DisplayString
help: Current status of the SSD - 1.3.6.1.4.1.116.5.46.1.9.1.5
indexes:
- labelname: nodeNumber
type: gauge
- labelname: ssdSlot
type: gauge
This works but is technically not a valid config as ssdSlot in that table is not an index. How can i use the generator to account for this type of mib?
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/prometheus-users/3fe25b2a-66c1-42da-8706-6dc88c3344bdn%40googlegroups.com.