In my prometheus.yml I have several jobs defined like:
- job_name: alpha
scheme: 'https'
metrics_path: '/metrics'
static_configs:
- targets:
- one.example
- two.example
relabel_configs:
- source_labels: [__address__]
regex: '(.*).example.*'
replacement: '${1}'
target_label: 'slug'
- job_name: beta
scheme: 'https'
metrics_path: '/metrics'
static_configs:
- targets:
- three.example
- four.example
relabel_configs:
- source_labels: [address]
regex: '(.).example.'
replacement: '${1}'
target_label: 'slug'
as you can see, only the targets differ per job, all the other configs like relabel_configs and scheme etc. are the same. Because its not only two jobs but around 20 for now, I don't want to repeat the same settings for each job. Is there no way to create a default config for all jobs?