Do you really mean they have IP addresses in *values*, or do you mean in 
*labels* ?  A value is a float64 number; it would be possible to put the 32 
bits of an IPv4 address in there, but it would be weird.

If you're talking about labels, then you could:
- modify the exporter to work in the way you want it to (for example, add a 
new label saying what data centre it is running in)
- write a small proxy which updates the labels on the fly during scrapes
- use metric relabeling to map a few specific IP addresses to names
- generate some static timeseries which map a few specific IPs to specific 
names, and join on them in queries.

The last two cases only work if the number of different IP addresses you 
expect to see is small and known in advance.  For an explanation of the 
last one see
https://www.robustperception.io/how-to-have-labels-for-machine-roles
https://www.robustperception.io/exposing-the-software-version-to-prometheus
https://prometheus.io/docs/prometheus/latest/querying/operators/#many-to-one-and-one-to-many-vector-matches

If the different data centres have different IP ranges, it may be enough to 
match on the prefix: e.g.

expr: foo{role="master",ip=~"10\.123\..+"} and 
bar{role="slave",ip=~"10\.123\..+}

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4c51463a-170b-4990-bb83-c7dce64fb914o%40googlegroups.com.

Reply via email to