-
Couldn't load subscription status.
- Fork 2k
feat(metrics): add push gateway support for Prometheus metrics #19243
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
base: main
Are you sure you want to change the base?
Conversation
…nfigurable interval
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 tested it locally like this :
docker run -d -p 9091:9091 prom/pushgateway
reth node --metrics=0.0.0.0:9001 --metrics.push.url=http://localhost:9091/metrics/job/test
curl http://localhost:9091/metrics
It seems to push correctly.
I'm wondering if it's relevant to add a test that spawns a HTTP server in order to inspect the PUT requests sent by the MetricServer. Wdyt ?
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.
only two comments, this is basically what we need, yeah!
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.
this lgtm
@Rjected likely has more context here
Closes #19229
This spawns a task to push metrics to prometheus following configurable interval (default 5sec).
Added CLI flags for push gateway url and push interval.