Ok, I think I see what is going on. Liebert uses an OBJECT-IDENTITY OID tree `lgpEnvTemperature` to label various metrics, rather than store them as strings in the target device.
This style of MIB identity lookup table is not supported by the snmp_exporter. No reason we don't support it, but it's not a commonly used technique. Most devices output their descriptions from the device as strings. Although, a quick search of some MIBs, it appears to be popular with UPS vendors. I suppose we should file a feature request issue for this. On Mon, Mar 18, 2024 at 1:07 AM Jonathan Davis <[email protected]> wrote: > Thank you for the assistance. Looks like it's still returning > uninteresting labels/descriptions (and some of those should be strings): > > # HELP lgpEnvTemperatureDescrDegC A reference to a temperature description > object - 1.3.6.1.4.1.476.1.42.3.4.1.3.3.1.2 > # TYPE lgpEnvTemperatureDescrDegC gauge > lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.1",lgpEnvTemperatureIdDegC="1"} > 1 > lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.11.1",lgpEnvTemperatureIdDegC="7"} > 1 > lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.11.2",lgpEnvTemperatureIdDegC="8"} > 1 > lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.13",lgpEnvTemperatureIdDegC="10"} > 1 > lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.2",lgpEnvTemperatureIdDegC="3"} > 1 > lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.3",lgpEnvTemperatureIdDegC="2"} > 1 > # HELP lgpEnvTemperatureHighThresholdTenthsDegC The high temperature > notification threshold - 1.3.6.1.4.1.476.1.42.3.4.1.3.3.1.51 > # TYPE lgpEnvTemperatureHighThresholdTenthsDegC gauge > lgpEnvTemperatureHighThresholdTenthsDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.2",lgpEnvTemperatureIdDegC="3"} > 394 > # HELP lgpEnvTemperatureLowThresholdTenthsDegC The low temperature > notification threshold - 1.3.6.1.4.1.476.1.42.3.4.1.3.3.1.52 > # TYPE lgpEnvTemperatureLowThresholdTenthsDegC gauge > lgpEnvTemperatureLowThresholdTenthsDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.2",lgpEnvTemperatureIdDegC="3"} > 156 > # HELP lgpEnvTemperatureMeasurementDegC The measured temperature value. - > 1.3.6.1.4.1.476.1.42.3.4.1.3.3.1.3 > # TYPE lgpEnvTemperatureMeasurementDegC gauge > lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.11.1",lgpEnvTemperatureIdDegC="7"} > 34 > lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.11.2",lgpEnvTemperatureIdDegC="8"} > 38 > lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.13",lgpEnvTemperatureIdDegC="10"} > 2.147483647e+09 > lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.2",lgpEnvTemperatureIdDegC="3"} > 23 > lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.3",lgpEnvTemperatureIdDegC="2"} > 22 > > > SNMP walks of *lgpEnvTemperatureMeasurementDegC* & *lgpEnvTemperatureTableDegC > *The *lgpEnvTemperatureMeasurementDegC.3* (value of 27) should be linked > to *lgpEnvReturnAirTemperature* or "*Temperature measurement of return > air.*" > > snmpwalk -m /usr/share/snmp/mibs/LIEBERT_GP_ENV.MIB -v2c x.x.x.x > lgpEnvTemperatureMeasurementDegC > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.2 = > INTEGER: 20 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.3 = > INTEGER: 27 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.7 = > INTEGER: 31 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.8 = > INTEGER: 29 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.10 = > INTEGER: 2147483647 degrees Celsius > > snmpwalk -m /usr/share/snmp/mibs/LIEBERT_GP_ENV.MIB -v2c x.x.x.x > lgpEnvTemperatureTableDegC > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDescrDegC.1 = OID: > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvControlTemperature > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDescrDegC.2 = OID: > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvSupplyAirTemperature > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDescrDegC.3 = OID: > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvReturnAirTemperature > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDescrDegC.7 = OID: > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpDigitalScrollCompressor1Temperature > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDescrDegC.8 = OID: > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpDigitalScrollCompressor2Temperature > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDescrDegC.10 = OID: > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpCoolantTemperature > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.2 = > INTEGER: 19 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.3 = > INTEGER: 27 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.7 = > INTEGER: 31 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.8 = > INTEGER: 29 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementDegC.10 = > INTEGER: 2147483647 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDailyHighDegC.1 = INTEGER: > 220 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDailyLowDegC.1 = INTEGER: > 158 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTempDailyHighTimeHourDegC.1 = INTEGER: > 58493 hours > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTempDailyHighTimeMinuteDegC.1 = > INTEGER: 58493 minutes > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTempDailyHighTimeSecondDegC.1 = > INTEGER: 58493 seconds > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTempDailyLowTimeHourDegC.1 = INTEGER: > 32691 hours > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTempDailyLowTimeMinuteDegC.1 = > INTEGER: 32691 minutes > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTempDailyLowTimeSecondDegC.1 = > INTEGER: 32691 seconds > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementTenthsDegC.2 = > INTEGER: 194 .1 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementTenthsDegC.3 = > INTEGER: 269 .1 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementTenthsDegC.7 = > INTEGER: 310 .1 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementTenthsDegC.8 = > INTEGER: 290 .1 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureMeasurementTenthsDegC.10 = > INTEGER: 2147483647 .1 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureHighThresholdTenthsDegC.3 = > INTEGER: 394 .1 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureLowThresholdTenthsDegC.3 = > INTEGER: 156 .1 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureSetPointTenthsDegC.1 = > INTEGER: 190 .1 degrees Celsius > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvTemperatureDeadBandTenthsDegC.1 = > INTEGER: 5 .1 degrees Celsius > > > *lgpEnvReturnAirTemperature* does exist in the MIB, but can't be walked > (I guessing object-identity?) : > > snmpwalk -m /usr/share/snmp/mibs/LIEBERT_GP_ENV.MIB -v2c x.x.x.x > lgpEnvReturnAirTemperature > LIEBERT-GP-ENVIRONMENTAL-MIB::lgpEnvReturnAirTemperature = No Such Object > available on this agent at this OID > > > -- > ============================================================================= > -- lgpEnvTemperatureMeasurements - Liebert "well-known" temperature > objects > -- > ============================================================================= > > lgpEnvControlTemperature OBJECT-IDENTITY > STATUS current > DESCRIPTION > "Temperature measurement used as control feedback." > ::= { lgpEnvTemperatureWellKnown 1 } > > *lgpEnvReturnAirTemperature* OBJECT-IDENTITY > STATUS current > DESCRIPTION > "Temperature measurement of return air." > ::= { lgpEnvTemperatureWellKnown 2 } > > > I've a feeling a lot of this is very obvious to those who know their MIBs. > My only thought at this point is some overrides? > > I do wish I didn't get back *lgpEnvTemperatureMeasurementDegC* multiple > times, and instead had *lgpEnvReturnAirTemperature* etc. but that's the > fault of the mibs? > > > On 2024-03-16 1:48 a.m., Ben Kochie wrote: > > This is a pretty standard lookup. But the MIB entry for > lgpEnvTemperatureDescrDegC is a bit strange. You can override the type > easily to make it a DisplayString. But, based on your output, I'm guessing > the device doesn't return a useful description. Can you provide an SNMP > walk comparison? > > Here's what I came up with: > > modules: > liebert: > walk: > - lgpEnvTemperatureTableDegC > lookups: > - source_indexes: [lgpEnvTemperatureIdDegC] > lookup: lgpEnvTemperatureDescrDegC > overrides: > lgpEnvTemperatureDescrDegC: > type: DisplayString > lgpEnvTemperatureMeasurementTenthsDegC: > scale: 0.1 > > > > On Sat, Mar 16, 2024 at 6:32 AM Jonathan Davis <[email protected]> > wrote: > >> Using vendor supplied mibs, added a module, generated my snmp.yml, and >> snmp_exporter is giving me some unexpected results such as: >> >> # HELP lgpEnvTemperatureMeasurementDegC The measured temperature value. - >> 1.3.6.1.4.1.476.1.42.3.4.1.3.3.1.3 >> # TYPE lgpEnvTemperatureMeasurementDegC gauge >> lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureIdDegC="10"} >> 2.147483647e+09 >> lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureIdDegC="2"} 20 >> lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureIdDegC="3"} 23 >> lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureIdDegC="7"} 33 >> lgpEnvTemperatureMeasurementDegC{lgpEnvTemperatureIdDegC="8"} 32 >> >> and >> >> HELP lgpEnvTemperatureDescrDegC A reference to a temperature description >> object - 1.3.6.1.4.1.476.1.42.3.4.1.3.3.1.2 >> # TYPE lgpEnvTemperatureDescrDegC gauge >> lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.1",lgpEnvTemperatureIdDegC="1"} >> 1 >> lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.11.1",lgpEnvTemperatureIdDegC="7"} >> 1 >> lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.11.2",lgpEnvTemperatureIdDegC="8"} >> 1 >> lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.13",lgpEnvTemperatureIdDegC="10"} >> 1 >> lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.2",lgpEnvTemperatureIdDegC="3"} >> 1 >> lgpEnvTemperatureDescrDegC{lgpEnvTemperatureDescrDegC="1.3.6.1.4.1.476.1.42.3.4.1.1.3",lgpEnvTemperatureIdDegC="2"} >> 1 >> # HELP lgpEnvTemperatureDescrDegF A reference to a temperature >> description object - 1.3.6.1.4.1.476.1.42.3.4.1.2.3.1.2 >> >> I am trying to sort out the lookups, source indexes, and lookup to use to >> retrieve a more descriptive result. >> >> >> relevant snippit from the mib: >> lgpEnvTemperatureEntryDegC OBJECT-TYPE >> SYNTAX LgpEnvTemperatureEntryDegC >> MAX-ACCESS not-accessible >> STATUS current >> DESCRIPTION >> "This entry defines the contents of the rows for the table >> 'lgpEnvTemperatureTableDegC'." >> INDEX { lgpEnvTemperatureIdDegC } >> ::= { lgpEnvTemperatureTableDegC 1 } >> >> LgpEnvTemperatureEntryDegC ::= SEQUENCE >> { >> lgpEnvTemperatureIdDegC Unsigned32, >> lgpEnvTemperatureDescrDegC OBJECT IDENTIFIER, >> lgpEnvTemperatureMeasurementDegC Integer32, >> lgpEnvTemperatureHighThresholdDegC Integer32, >> lgpEnvTemperatureLowThresholdDegC Integer32, >> lgpEnvTemperatureSetPointDegC Integer32, >> lgpEnvTemperatureDailyHighDegC Integer32, >> lgpEnvTemperatureDailyLowDegC Integer32, >> lgpEnvTempDailyHighTimeHourDegC Integer32, >> lgpEnvTempDailyHighTimeMinuteDegC Integer32, >> lgpEnvTempDailyHighTimeSecondDegC Integer32, >> lgpEnvTempDailyLowTimeHourDegC Integer32, >> lgpEnvTempDailyLowTimeMinuteDegC Integer32, >> lgpEnvTempDailyLowTimeSecondDegC Integer32, >> lgpEnvTemperatureMeasurementTenthsDegC Integer32, >> lgpEnvTemperatureHighThresholdTenthsDegC Integer32, >> lgpEnvTemperatureLowThresholdTenthsDegC Integer32, >> lgpEnvTemperatureSetPointTenthsDegC Integer32, >> lgpEnvTemperatureDeadBandTenthsDegC Integer32, >> lgpEnvTempHeatingPropBandTenthsDegC Integer32, >> lgpEnvTempCoolingPropBandTenthsDegC Integer32 >> >> } >> >> lgpEnvTemperatureIdDegC OBJECT-TYPE >> SYNTAX Unsigned32 >> MAX-ACCESS read-only >> STATUS current >> DESCRIPTION >> "This OID is used as an index to identify a row in the table >> 'lgpEnvTemperatureTableDegC'." >> ::= { lgpEnvTemperatureEntryDegC 1 } >> >> lgpEnvTemperatureDescrDegC OBJECT-TYPE >> SYNTAX OBJECT IDENTIFIER >> MAX-ACCESS read-only >> STATUS current >> DESCRIPTION >> "A reference to a temperature description object. The object >> referenced should not be accessible, but rather be used to provide >> a unique description of the temperature." >> ::= { lgpEnvTemperatureEntryDegC 2 } >> >> lgpEnvTemperatureMeasurementDegC OBJECT-TYPE >> SYNTAX Integer32 >> UNITS "degrees Celsius" >> MAX-ACCESS read-only >> STATUS current >> DESCRIPTION >> "The measured temperature value." >> ::= { lgpEnvTemperatureEntryDegC 3 } >> >> >> Any help to understand how I should be configuring the module in the >> generator would be much appreciated. >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/prometheus-users/01c04d69-aadb-4be0-ae5d-9344d848556cn%40googlegroups.com >> <https://groups.google.com/d/msgid/prometheus-users/01c04d69-aadb-4be0-ae5d-9344d848556cn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Prometheus Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/prometheus-users/M4u50WIeawQ/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/CABbyFmq6yH4FJivgsauJXYgtUpWkqCRC3HR6BtB9fzu2wUT14w%40mail.gmail.com > <https://groups.google.com/d/msgid/prometheus-users/CABbyFmq6yH4FJivgsauJXYgtUpWkqCRC3HR6BtB9fzu2wUT14w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/7dc840da-f0a1-4d44-818b-08139afe7305%40prioritycolo.com > <https://groups.google.com/d/msgid/prometheus-users/7dc840da-f0a1-4d44-818b-08139afe7305%40prioritycolo.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CABbyFmpLOkFycs-cbJ_6ZYvaKjgUKSLM%3DdDARd4ABno%3DL5K8tA%40mail.gmail.com.

