-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Telemetry: add prometheus endpoint option #2937
Comments
Well, exposing a port with some text is a security concern, then use the push-gateway: |
The right course of action there would be to enhance go-metrics to support push-gateway. |
The push gateway will probably always be akward:
Personally I regard that as an extra moving part which can breakdown. Prometheus actually has some valid points regarding push vs pull: https://prometheus.io/docs/introduction/faq/#why-do-you-pull-rather-than-push? @jefferai In this #1415 (comment) you state:
Would you be open to a pull request which adds an authenticated |
I like the idea of a plain, token-authenticated, HTTP/S endpoint that provides JSON-formatted metrics, agnostic to Prometheus or any other particular solution (similar to Consul) |
I'm going to be using vault in a production environment (five nodes per site in HA mode backed by etcd) and will need to trigger alerts if any of the nodes needs to be unsealed. |
@andybrown668 its not ideal but you can use a statsd exporter. https://github.com/prometheus/statsd_exporter So you have vault push its metrics to the exporter and then have prometheus scrape the metrics from the exporter. Its pretty ugly and makes metric collection significantly more complicated but it does work. It requires sidecaring the exporter on the same host as the vault instance, otherwise host label won't be set properly. I found that use consul service discovery made this less annoying. Word of caution: I would not use dogstatsd exporter. If vault cannot connect to the exporter, then vault crashes which means that an exporter becomes a SPOF for vault. I opened a bug against vault and it was closed because from hashicorp's point of view this is working as expected. This problem does not occur with statsd since metrics are exported over UDP. |
If you're using influxdata/telegraf, it has a statsD input plugin (act as a statsD server), this way you get system metrics and Vault metrics in one component (vs. Prometheus NodeExporter+statsDExproter) |
You can use blackbox for that. So for example in the blackbox.yml you can have The valid status codes are 200 and 429, because the standby node replies with a 429 (which is expected) and the active node with a 200 The rule in alertmanager to trigger the alerts: You can also use statsd-exporter to gather more specific stats and better alerts with expressions like: Hope it helps. |
Folks, I see that go-metrics library has some support for Prometheus https://github.com/armon/go-metrics/tree/master/prometheus . Can this be used to expose Prometheus metrics as @jefferai mentioned? |
as per here; https://coreos.com/tectonic/docs/latest/vault-operator/user/monitoring.html#alerting-rules These metrics do not seem to exist in Vault 1.1.0. Does anyone have any recommendation for alerts outside of these? |
Closing this since, apparently, this has been implemented with #5308. |
This is a wishlist request to have an option within vault telemetry to configure an endpoint on vault so that prometheus servers can gather metrics from vault.
The text was updated successfully, but these errors were encountered: