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:
- 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.