On Friday, 18 September 2020 10:58:07 UTC+1, karthigaa M wrote:
>
> Is it possible to create multiple target file(prometheus.yml) file for a 
> single prometheus machine?
>
>
Yes.  If you are currently using static_sd_configs in prometheus.yml, use 
file_sd_configs to put the targets in different files.  For example:

  - job_name: node
    file_sd_configs:
      - files:
        - /etc/prometheus/targets.d/nodes_east.yml
        - /etc/prometheus/targets.d/nodes_west.yml

The format of the target files is:

- targets:
    - 1.1.1.1
    - 2.2.2.2
  labels:
    foo: bar
- targets:
    - 3.3.3.3
    - 4.4.4.4
  labels:
    baz: qux

(labels are optional; if you include them, they are applied to all targets 
in that group)

Another advantage of target files is that if you change them, prometheus 
re-reads them automatically.  You don't need to send a HUP signal to 
prometheus.

-- 
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/00236b82-f846-481f-8371-0d1c39882568o%40googlegroups.com.

Reply via email to