vault icon indicating copy to clipboard operation
vault copied to clipboard

Vault Agent - Prometheus PushGateway support

Open zamazan4ik opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. We are using Vault Agent for retrieving secrets from Vault and rendering them into the files on a machine. Vault Agent is started during the deployment process and after the successful secret render is closed (with -exit-after-auth option).

Since Vault Agent usually is closed quickly, there is no stable way to expose metrics via Prometheus endpoint. We are interested in the metrics since based on them we could set up alerts for auth errors.

Describe the solution you'd like I want to be able to push metrics from Vault Agent directly to Prometheus via Prometheus Pushgateway. I know that Pushgateway is not recommended way to work with metrics. But for short-lived jobs, there are no other alternatives.

Describe alternatives you've considered I do not know a good alternative solution. The only possible solution I see is to set up scrape periodicity for Vault to some veeeery frequent value - but it's too ugly and kinda unstable.

Another option is just not to finish vault agent process and just restart it during the deployment process. Possibly, secret re-render could be done without a restart but the corresponding question is unanswered yet - https://discuss.hashicorp.com/t/manually-trigger-secret-rendering-with-vault-agent/45395 .

zamazan4ik avatar Dec 19 '22 10:12 zamazan4ik