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
status: allow exporting ConnectivityCheck results over HTTP #2411
Conversation
Adds a command that initiates ConnectivityCheck every `interval` and serves the results in the form of prometheus metrics.
c08cfa2
to
cfe5fb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I like that approach very much: do I correctly understand that you put the charge of fetching the status and sending it to prometheus on the status
binary?
In our current systems, this would work best as a one-shot thing: call status serve
once every 5 minutes. But YMMV...
This is not how prometheus works. Prometheus works by scraping various systems and letting them expose their status. As such, this starts a webserver that exposes the metrics on a webpage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor remarks to improve our debugging capabilities
Hmm - true. I was still thinking about Grafana. You'll have to explain to me sometimes why a logger that calls the service to be logged is a good idea. Getting back to my previous idea - shouldn't this be implemented using https://github.com/dedis/onet/blob/992a708c6c664b744ec67d8ea6f9b0181c16d166/processor.go#L192 ? Then you wouldn't even have to start yet another process, but could let the nodes serve Prometheus. You would have to add a rate-limitation, but other than that, I would prefer that... |
Grafana just does visualisation. I assume you're thinking about Graphite. |
I think the limitation there is the REST Handler only supports JSON responses but Prometheus expects a text format in the response. Re: rate-limitation, I think the metrics would only be consumed by the conode internally and I'd assume the HTTP port would be firewalled to allow connections only from trusted sources (i.e. the prometheus server). |
There's no need for rate limiting : Prometheus metrics are never meant to be "computed" on HTTP request, merely displayed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Awesome :)
Adds a command that initiates ConnectivityCheck every
interval
and serves the results in the form of prometheus metrics.