How to configure the generator.yml file to obtain a specified OID subset?

14 views
Skip to first unread message

Awemnhd

unread,
Jun 4, 2024, 6:28:04 AMJun 4
to Prometheus Users
Software version:
snmp_exporter-0.26.0.linux-amd64

OID Node Name: sensorName
OID: 1.3.6.1.4.1.2011.2.235.1.1.13.50.1.1

OID Node Name:  sensorReading
OID: 1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2

OID Node Name:  sensorStatus
OID: 1.3.6.1.4.1.2011.2.235.1.1.13.50.1.9

There are 173 records in the single oid node traversal, many of which are very mixed, and most of the values ​​are na!

I want to specify the following oid node (Not all, just a screenshot of part)
1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2.17.67.80.85.49.32.68.84.83.0.0.0.0.0.0.0.0.0
1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2.17.67.80.85.49.32.86.67.111.114.101.0.0.0.0.0.0.0
1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2.17.67.80.85.50.32.68.84.83.0.0.0.0.0.0.0.0.0
1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2.17.67.80.85.50.32.86.67.111.114.101.0.0.0.0.0.0.0
1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2.17.80.83.49.32.84.101.109.112.0.0.0.0.0.0.0.0.0
1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2.17.80.111.119.101.114.49.0.0.0.0.0.0.0.0.0.0.0
1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2.17.80.83.50.32.84.101.109.112.0.0.0.0.0.0.0.0.0
1.3.6.1.4.1.2011.2.235.1.1.13.50.1.2.17.80.111.119.101.114.50.0.0.0.0.0.0.0.0.0.0.0

Note: All non-specified OID subsets are ignored, I only have the values ​​for the specified OIDs.

Finally, after compiling through generator.yml, I like to display this data structure:

sensorName{sensorName="Inlet Temp",sensorReading="20",sensorStatus="ok"} 1


So how do you edit the generator.yml file so that the above requirements can be achieved after compilation?


Reply all
Reply to author
Forward
0 new messages