vault
vault copied to clipboard
best-practice: prom format by header
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!
@hsimon-hashicorp , this doesn't appear to be a doc issue. Could you please triage this w/ your team? Thanks.
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.