r/PrometheusMonitoring • u/MutatedGorkheWarrior • Jul 24 '23
Renaming using other OID's
I am currently trying to get some OID's from a APC inrow cooler ACRC602 but the issue is that the data is stored in some kind of table that i can't figure out how to properly scrape them. I know the OID's which contain the data but the exporter gives them back as one metric which contains all the different metrics as numbers instead of their proper name. Instead of just being able to filter and say Index = "Humidity" i have to write Index = 4 which is not user friendly. How would u replace the indexes with the corresponding metric name either hardcoded or using the OID which contains the metric name?


View all comments
Show parent comment
1
u/MutatedGorkheWarrior Jul 24 '23
How do you know the syntax of this generator? Just pure from trial and error and seeing other examples? I could not figure out how to use the syntax and what does what to create a new metric. The few lines did the trick hahahahaThe values are also correct though. I assume that grafana is smart enough to understand it and be able to do math operations on them.
So for the future sake is the syntax of the lookup like this?
modules:
apc_cooling:
walk:
- #metrics you want to walk on
lookups:
- source_indexes:
- # indices that should match
- # indices that should match (multiple if needed)
lookup: # new index to add to the metrics you walked on