Hi. I want to use a single job and a file for probing targets with different modules. My job currently looks like this.
- job_name: 'blackbox_TestingAllInSameFile'
metrics_path: /probe
file_sd_configs:
- files:
- /root/test.yml
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- source_labels: [module]
target_label: __param_module
- target_label: __address__
scrape_interval: 10s
My target file looks like this:
- targets:
- t1
- t2
labels:
module: 'http_healthcheck'
checkname: 'a'
cluster: 'b'
node: 'c'
env: 'PROD'
My http_healthcheck module will be used for most of the targets. So, is there any way to make it as a fallback module and not define module label everytime for this particular module? I mean I want to define the module label only when it is anything other than http_healthcheck.
Is there any way we could achieve this using relabel_configs?
Thanks in advance!