I am trying to use Prometheus and snmp-exporter to extract some information on voltage readings of some network equipment and I need to divide the output it provides by 10000 and have Prometheus output this value.
My config in snmp.yml is
- name: tmnxDDMSupplyVoltage
oid: 1.3.6.1.4.1.6527.3.1.2.2.4.31.1.6
type: gauge
help: The current supply voltage in 1/10000 of Volt(V) - .1.3.6.1.4.1.6527.3.1.2.2.4.31.1.6
indexes:
- labelname: tmnxChassisIndex
type: gauge
- labelname: tmnxPortPortID
type: gauge
lookups:
- labels:
- tmnxChassisIndex
- tmnxPortPortID
labelname: tmnxPortDescription
oid: 1.3.6.1.4.1.6527.3.1.2.2.4.2.1.5
type: DisplayString
- labels:
- tmnxChassisIndex
- tmnxPortPortID
labelname: tmnxPortName
oid: 1.3.6.1.4.1.6527.3.1.2.2.4.2.1.6
One of the outputs this code produces is
tmnxDDMSupplyVoltage{tmnxChassisIndex="1",tmnxPortDescription="QSFP-DD Connector",tmnxPortName="0x312F312F6331",tmnxPortPortID="1610899520"} 32869
The value 32869 is what I want to divide by 10000.
Can this be done ? Any help and advice would be most useful.
I have tried to use overrides in my snmp.yml config but not to sure if I need to divide by 10000 or some how move the decimal point another way .
Thanks M