Customizing labels with SNMP Exporter

32 views
Skip to first unread message

Elliott Balsley

unread,
Apr 15, 2025, 9:20:59 AMApr 15
to Prometheus Users
I have an SNMP device which returns a table of sensors, including columns for left fan and right fan speed.  After applying a lookup in the generator, the metrics look like this:
unit_fan_left{ledStatusUnitPortId="1",ledStatusUnitUnitId="1"} 1450
unit_fan_right{ledStatusUnitPortId="1",ledStatusUnitUnitId="1"} 1449

Is it possible to combine these into one metric with a fan label like this?
unit_fan{ledStatusUnitPortId="1",ledStatusUnitUnitId="1", fan="left"} 1450
unit_fan{ledStatusUnitPortId="1",ledStatusUnitUnitId="1", fan="right"} 1449

Elliott Balsley

unread,
Apr 16, 2025, 2:51:43 PMApr 16
to Prometheus Users
I was hoping to do this in the exporter, but otherwise I can do it easily enough with a relabel config on the scrape.
Reply all
Reply to author
Forward
0 new messages