When configuring healthwatch federation (available in Healthwatch 2.1), TSDB scrape job may not work as expected.
If you configure TSDB scrape job using a wildcard such as .*, it will not work.
Example TSDB scrape job:
job_name: pcf-paas-1
metrics_path: /federate
scheme: https
params:
'match[]':
'{_name_=~"^.*"}'
static_configs:
targets:
"192.168.1.5:4450"
Product Version: 2.1
Note: It is not recommended to use wildcard operators, as the wildcard will match ALL metrics which could generate enough volume to overwhelm Prometheus instances.
Prometheus selectors must either specify a name or at least match one label that does not match an empty string. So a valid configuration of the regex match would be as follows:
job_name: pcf-paas-1
metrics_path: /federate
scheme: https
params:
'match[]':
'{_name_=~"^.+"}'
static_configs:
targets:
"192.168.1.5:4450"
The regex string "^.+" is acceptable, as it will not match empty label values.