vault icon indicating copy to clipboard operation
vault copied to clipboard

best-practice: prom format by header

Open Freyert opened this issue 2 years ago • 1 comments

I'm configuring a deployment of Vault Agents to act as Proxies. I was configuring telemetry for these proxies to be scraped by a Prometheus server. I found it very difficult to add format=prometheus, as the documentation encourages, in order scrape the target path since I configure scrape targets mostly with kubernetes_sd.

I would have to add a new relabel rule just to accommodate Vault. This would lead to negotiating with cluster admins to include the use case and from what I can tell there's no way to make a "generic" __param_X annotation.

Fortunately it's not an issue because the endpoint automatically formats the response to Prometheus format if the correct Accept headers are presented.

I would like to help other find the answer more quickly than I did :). I'm not sure what this looks like when it renders so if I need to fix anything please let me know!


Freyert avatar Jul 19 '22 20:07 Freyert

@hsimon-hashicorp , this doesn't appear to be a doc issue. Could you please triage this w/ your team? Thanks.

taoism4504 avatar Jul 19 '22 22:07 taoism4504

This PR looks great! Thanks for the contribution. Sorry it took us a while to get to this, but this looks great and I'm going to try and get it merged.

VioletHynes avatar Aug 18 '23 20:08 VioletHynes