Yes that's correct, but you'll find it easier to use file_sd_configs.  The 
YAML is basically the same:

- targets:
    - ...
    - ...
  labels:
    ...: ...

but by putting it in a separate file, you don't need to touch 
prometheus.yml.  Also, prometheus automatically picks up when file_sd files 
change (you don't need to HUP prometheus)

You might also want to look at this:
https://www.robustperception.io/controlling-the-instance-label

<https://www.robustperception.io/controlling-the-instance-label>
It's very helpful to keep the exporter port out of the instance label, so 
you end up with

foo{instance="x.x.x.x"}
instead of
foo{instance="x.x.x.x:9187"}

Indeed, it may be a good idea to keep the IP address out of the instance 
label, and use a meaningful name like

foo{instance="db1"}

but set the __address__ to be x.x.x.x:9187 so this is what gets scraped.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/544f1259-3b39-4676-8634-f697364c4ddc%40googlegroups.com.

Reply via email to