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

Add informational metrics to prometheus endpoint #21783

Closed
ulope opened this issue Nov 3, 2020 · 19 comments
Closed

Add informational metrics to prometheus endpoint #21783

ulope opened this issue Nov 3, 2020 · 19 comments

Comments

@ulope
Copy link
Member

ulope commented Nov 3, 2020

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
@karalabe
Copy link
Member

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.

@no-response
Copy link

no-response bot commented Jul 24, 2021

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.

@no-response no-response bot closed this as completed Jul 24, 2021
@ulope
Copy link
Member Author

ulope commented Oct 5, 2021

@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.

@Ab-hishek
Copy link

I would like to work on this issue if this is still required.

@muddlebee
Copy link

@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.

@muddlebee
Copy link

@ulope FYI

@holiman
Copy link
Contributor

holiman commented Nov 4, 2021

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

@muddlebee
Copy link

muddlebee commented Nov 4, 2021

@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?

@holiman
Copy link
Contributor

holiman commented Nov 4, 2021

Sure, just go ahead.
(no need to assign the ticket though)

@aertoria
Copy link

this ticket is still open? should we close it?

@ghost
Copy link

ghost commented Oct 5, 2022

I also really need that metrics, it's very useful!

@timqian
Copy link

timqian commented Feb 15, 2023

Is this feature still needed? Saw an old relevant PR: jorgeacortes@cff0d59 why didn't we merge that?
If this feature is still needed, I would like to have a try

@holiman
Copy link
Contributor

holiman commented Feb 15, 2023

why didn't we merge that?

The PR in question is here: #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.

@karalabe
Copy link
Member

THere was AFAIK a different PR opened that also does this for influx. Should look into that, we need both.

@Francesreid

This comment was marked as off-topic.

@timqian
Copy link

timqian commented Feb 16, 2023

@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

@mcdee
Copy link
Contributor

mcdee commented Feb 16, 2023

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.

holiman pushed a commit to jorgeacortes/go-ethereum that referenced this issue Aug 26, 2023
…onal metrics

- Created GaugeInfo metrics type for registering informational metrics.
- Updated all related metrics modules to support the new GaugeInfo type.
- Registered chain/info GaugeInfo with the chain_id value.
- Registered geth/info GaugeInfo with system and build parameters.

Implements ethereum#21783
@holiman
Copy link
Contributor

holiman commented Aug 28, 2023

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.

holiman added a commit that referenced this issue Aug 31, 2023
…sb) (#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry. 

Implements #21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
@holiman
Copy link
Contributor

holiman commented Aug 31, 2023

Closed by #24877

@holiman holiman closed this as completed Aug 31, 2023
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this issue Nov 10, 2023
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry. 

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this issue Dec 6, 2024
…sb) (24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this issue Dec 6, 2024
…sb) (24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this issue Dec 6, 2024
…sb) (24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this issue Dec 9, 2024
…sb) (24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this issue Dec 9, 2024
…sb) (24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this issue Dec 10, 2024
…sb) (24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan added a commit to gzliudan/XDPoSChain that referenced this issue Dec 10, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan added a commit to gzliudan/XDPoSChain that referenced this issue Dec 10, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan added a commit to gzliudan/XDPoSChain that referenced this issue Dec 10, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan added a commit to gzliudan/XDPoSChain that referenced this issue Dec 13, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this issue Dec 16, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this issue Dec 16, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this issue Dec 20, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this issue Dec 20, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this issue Dec 22, 2024
…sb) (ethereum#24877)

This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements ethereum#21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

11 participants