Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to ascertain vault agent authentication status from metrics #26569

Closed
markafarrell opened this issue Apr 21, 2024 · 2 comments · Fixed by #26570
Closed

Unable to ascertain vault agent authentication status from metrics #26569

markafarrell opened this issue Apr 21, 2024 · 2 comments · Fixed by #26570
Labels

Comments

@markafarrell
Copy link
Contributor

markafarrell commented Apr 21, 2024

Is your feature request related to a problem? Please describe.
Currently vault agent only exposes counters for authentication failures and successes. It does not expose a metric to tell you the current state of authentication (i.e. vault agent has successfully authenticated and has a valid token or vault agent has been unable to authenticate and does not have a valid token).

Describe the solution you'd like
It would be good to expose a gauge (vault.agent.auth.authenticated) that is set to 1 if vault agent has a valid token or 0 if it does not.
This metric could then be used for alerting to act if vault agent does not have a valid token.

Describe alternatives you've considered
Currently this can be done in a round about way for looking at the value of vault.agent.auth.failure and vault.agent.auth.success in a sliding window, however, it would be nicer if there was a single metric that told you the current status of vault agent authentication.

@divyaac
Copy link
Contributor

divyaac commented Apr 22, 2024

HI @markafarrell, thank you so much for raising this and for submitting your PR? I wonder if instead of adding a new metric, the server logs would be helpful? See https://github.com/hashicorp/vault/blob/main/command/agentproxyshared/auth/auth.go#L480

@markafarrell
Copy link
Contributor Author

@divyaac See #26570 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants