@Mang0Musztarda said in Xen Orchestra OpenMetrics Plugin - Grafana Dashboard:
@MajorP93 hi, how can i scrape openmetrics endpoint?
i set up openmetrics plugin prometheus secret, enabled it, and ten tried to use curl like that: curl -H "Authorization: Bearer abc123" http://localhost:9004
but response i got was
{"error":"Query authentication does not match server setting"}
what am i doing wrong?
Hey!
I scrape it like so:
root@prometheus01:~# cat /etc/prometheus/scrape_configs/xen-orchestra-openmetrics.yml
scrape_configs:
- job_name: xen-orchestra
honor_labels: true
scrape_interval: 30s
scrape_timeout: 20s
scheme: https
tls_config:
insecure_skip_verify: true
bearer_token_file: /etc/prometheus/bearer.token
metrics_path: /openmetrics/metrics
static_configs:
- targets:
- xen-orchestra.domain.local
/etc/prometheus/bearer.token file contains the bearer token as configured in openmetrics xen orchestra plugin.
best regards