Thanks for the hint with the wildcard!

What I don't yet understand is what you mean by "it is set from the 
"module" label in the targets file." My target files are built like:

- targets:
      - "name" "ip-adress"
      - "name" "ip-adress"
      - "name" "ip-adress"

where does the label actually come from?

Brian Candler schrieb am Freitag, 28. April 2023 um 14:55:10 UTC+2:

> On Friday, 28 April 2023 at 13:13:22 UTC+1 Kolja Krückmann wrote:
>
>
>   - job_name: 'Ping (ICMP)'
>     metrics_path: /probe
>     params:
>       module: [icmp_ttl5]
>
>
> Incidentally, you don't need to specify that here, because with the 
> rewriting rules given, it is set from the "module" label in the targets 
> file. (However, it will act as a default in case you don't specify it there)
>
>  
>
>     file_sd_configs:
>       - files:
>         - C:\Prometheus\targets\hosts.yml
>         - C:\Prometheus\targets\netcomponents.yml
>         - C:\Prometheus\targets\vmhost-05.yml
>         - C:\Prometheus\targets\vmhost-06.yml
>         - C:\Prometheus\targets\vmhost-08.yml
>         - C:\Prometheus\targets\vmhost-09.yml
>         - C:\Prometheus\targets\vmhost-10.yml
>         - C:\Prometheus\targets\vmopheo-01.yml
>         - C:\Prometheus\targets\vmopheo-02.yml
>         - C:\Prometheus\targets\vmopheo-04.yml
>         - C:\Prometheus\targets\vmopheo-06.yml
>         - C:\Prometheus\targets\vmopheo-07.yml
>         - C:\Prometheus\targets\vmopheo-08.yml
>
>
> That's fine but it means you've hard-coded a list of files in your 
> prometheus.yml.  You should be able to simplify it to this (works under 
> Linux anyway):
>
>     file_sd_configs:
>       - files:
>         - C:\Prometheus\targets\*.yml
>
>

-- 
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/1b9bc9d6-5eea-48b1-bd5b-defface67f6fn%40googlegroups.com.

Reply via email to