Healthwatch Federation Prometheus scrape does not work
search cancel

Healthwatch Federation Prometheus scrape does not work

book

Article ID: 293635

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

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"



Environment

Product Version: 2.1

Resolution


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.