On 03/03/2021 17:18, John Dexter wrote:
--
Stuart Clark
Stuart, this is totally bespoke C++ Windows system, none of
those :) The file-discovery seems able to pull out my targets but
I can't find a good example how to structure my files. I suppose
each Module A, B, C, ... should be the jobs, but I'd far rather
not have to list each of my targets/servers once for every job
when it's all the same.
Yes each module probably wants to be a separate job.
Multiple jobs can use the same YAML/JSON files with file_sd, so
you could create a single file (with just the hostnames/IPs) and
then use relabling to add the correct port number for each job.
--
Stuart Clark
I've been looking at the examples here
https://prometheus.io/docs/guides/file-sd/
<https://prometheus.io/docs/guides/file-sd/> and I cannot see how I
would apply relabeling as described - their final example is similar
to my case and they duplicate the entire section for the same job on
two targets. You seem to be suggesting that could be avoided but I
cannot see how.
In your YAML/JSON files just have the bare IP/hostname (no port) and
then within each job you can use relabing to add the correct port number.
--
Stuart Clark
--
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/b0af34ff-3185-4acd-83e6-0e4e7ce61351%40Jahingo.com.