Prometheus annotations for URL parameters

Hi guys, I’m trying to scrape the metrics endpoint via annotations, unfortunately I can’t put ?format=prometheus in path. I can’t find any documentation on how to pass it via annotations, does anyway know how to do it?

prometheus.io/scrape: 'true'
prometheus.io/path: '/v1/sys/metrics?format=prometheus'
prometheus.io/port: '8200'

I used helm charts to deploy both vault and prometheus (via loki-stack).

There’s nothing about annotations in this tutorial, I already went through it. It uses a yml config, not annotations.

implies that

prometheus.io/param_format: prometheus

might work.

1 Like

@maxb Worked like a charm, thank you very much!