Add informational metrics to prometheus endpoint
System information
Geth version: 1.9.23
OS & Version: OSX
Feature request
Please add informational metrics to the prometheus endpoint:
- Chain / network info
- Geth version
For example:
# TYPE chain_info gauge
chain_info{chain_id="5", network_name="goerli"} 1
# TYPE geth_info gauge
geth_info{version="1.9.23-stable", arch="amd64", os="darwin", commit="deadbeef", protocol_versions="63,64,65"} 1
We'd need to investigate a bit how to expose metadata in Prometheus and InfluxDB. I'm all for surfacing these infos, just have no idea yet what the standard way is. If you have any docs you could point us to, that would be grand.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have more relevant information or answers to our questions so that we can investigate further.
@karalabe Sorry I missed this.
Here's a (pretty old but still accurate) post on the Robust Perception blog
As well as a sample of some of the exporters / tools I've used in the past that include such a metric:
My example above follows this pattern.
I would like to work on this issue if this is still required.
@karalabe @holiman @MariusVanDerWijden can this be closed ?
MONITORING GETH WITH INFLUXDB AND GRAFANA : https://ethereum.org/en/developers/tutorials/monitoring-geth-with-influxdb-and-grafana/ has been already added.
@ulope FYI
Cannot be closed, no. The issue requests meta-information to be exposed via influx/prometheus, like
# TYPE chain_info gauge
chain_info{chain_id="5", network_name="goerli"} 1
# TYPE geth_info gauge
geth_info{version="1.9.23-stable", arch="amd64", os="darwin", commit="deadbeef", protocol_versions="63,64,65"} 1
Not fixed
@holiman this looks interesting. Can I work on this? I am participating in Ethereum "Core Developer" Apprenticeship Program . I might add this as well in my deliverable tasks.
If this sounds good. Can you assign this task to me please?
Sure, just go ahead. (no need to assign the ticket though)
this ticket is still open? should we close it?
I also really need that metrics, it's very useful!
Is this feature still needed? Saw an old relevant PR: https://github.com/jorgeacortes/go-ethereum/commit/cff0d5924b1f531fcdf7da59cea5548c6afbc4a2 why didn't we merge that? If this feature is still needed, I would like to have a try
why didn't we merge that?
The PR in question is here: https://github.com/ethereum/go-ethereum/pull/24877 . As for why it has not been merged, I would guess that the answer is that it touches 17 files and adds 423 LOC, adding a new gauge-type. Reviewing + testing that is non-trivial, particularly since the testing involves not only the code itself, but testing against e.g. grafana.
So, (and this is not criticism!), it kind of has the combo of being "rather large amount of work" and also "not considered high prio".
If this feature is still needed, I would like to have a try
If you want to help push the feature along, I think rather than implementing it all over again (unless you have some better idea about how to do it), it would be better to spend the effort towards reviewing and testing that pr, and give feedback on how it works.
THere was AFAIK a different PR opened that also does this for influx. Should look into that, we need both.
Thankyou forball the work you're putting in , what have I got to do at my end Frances Reid
On Wed, 15 Feb 2023, 09:02 Péter Szilágyi, @.***> wrote:
THere was AFAIK a different PR opened that also does this for influx. Should look into that, we need both.
— Reply to this email directly, view it on GitHub https://github.com/ethereum/go-ethereum/issues/21783#issuecomment-1430974032, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYKCHV6DS52BAWOH5CVQ6DLWXSLRHANCNFSM4TI3BV4Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@holiman Thanks for the note, the PR looks good to me, looks adding a new gauge-type is inevitable. I have tested it and left a comment there @karalabe I didn't see another PR doing this for influx. Seems the influx part is also handled in the same PR
I made a few comments on the PR. This would be very useful to have: for anyone attempting to manage multiple instances of geth, having version information to hand via prometheus allows much easier understanding of which versions are where.
THere was AFAIK a different PR opened that also does this for influx. Should look into that, we need both.
The PR contains both. I searched but haven't found any other PR, if you know of one I'd gladly check what it contains and if there's anything we're missing.
Closed by https://github.com/ethereum/go-ethereum/pull/24877