Closed hbokh closed 3 years ago
Hey there! I understand that it might make your specific use case a little less convenient, but the new-style config is designed to very explicit about everything, which usually helps prevent errors in the long run. That said, you basically have three options to handle your described setup:
default
module entirely from the exporter config, instead listing a module for each target individually. This solution is often used in larger environments, where the exporter config is often generated from some sort of asset inventory anyways. But yeah, it may not may not be great if you maintain the config by hand.- target_label: __param_module
replacement: default
action: replace
/etc/prometheus/targets/ipmi_exporter.yml
with labels:
- targets: [ - '<host>' ] labels: [ <labelname>: <labelvalue> ... ]
So you could assign a label module
to every target, then write a relabel rule that replaces __param_module
with the value of module
.
Reading your description, I think maybe option 3 might be the most suitable here?
Let me know if you need any further details or examples for any of the above approaches!
Thanks for the response, Conrad. Much appreciated! I'll have a look after the weekend and discuss the options with my co-workers.
For now we hold on to the current option, but are considering option 3 in a future iteration.
Long time user of
ipmi_exporter
here! ❤️ I have finally upgraded our version dating from Aug. 2018 to v1.3.2. Now the changes inipmi.yml
have slapped me in the face pretty hard.We use a combination of (lets make it) 56 hosts: 40 hosts with password
12345
, 8 hosts with passwordabcde
and another 8 with password1a2b3c
used to be working where the 40 hosts where used asdefault
and the other 2x 8 ones as "specialhosts", using their unique IP addresses:Old
ipmi.yml
used to be pretty small, usingdefault
as expected:The only way I could get it to work was adding ALL hosts / IP addresses separately one-by-one into the newer
ipmi.yml
as "module", like this:The block with
default
is needed, otherwise a scrape would giveIn file
/etc/prometheus/prometheus.yml
currently the job is configured like this - I freshly added thesource_labels
-block with__param_module
as suggested here: https://github.com/soundcloud/ipmi_exporter/issues/50#issuecomment-778351848I hope the above explains the situation where we came from and how it runs as of today.
My question: is this for now the right way to go or is there a better way? The newer
ipmi.yml
has grown considerably, in our case to over 260 lines.