Is it possible to collect node's metrics? Such as bandwidth usage, memory usage, memory pool size, block height, estimate fee and so on, and export all these metrics on the port that offers the Prometheus metric format. This feature will be more convenient for operator to monitor the nodes' performance by using the modern monitor system, such as Grafana.
Collect node's metrics in Prometheus format #10887
issue hyperwang opened this issue on July 20, 2017-
hyperwang commented at 6:35 AM on July 20, 2017: none
-
windsok commented at 2:15 AM on July 21, 2017: contributor
Check out http://statoshi.info/ and https://github.com/jlopp/statoshi
-
jonasschnelli commented at 6:51 AM on July 21, 2017: contributor
I'd like the idea that Core would allow to collect more statistical data (not a code fork). A move towards that direction is #8501.
- jonasschnelli added the label Feature on Jul 21, 2017
-
hyperwang commented at 7:54 AM on July 21, 2017: none
@jonasschnelli Cool idea for collecting metrics by using CScheduler and offer the data in an rpc interface. But it is a little complicated to manage the stats metric series, it brings more codes to handle the metric storage and collecting interval. Just offering the metric itself not the history is simple, and leave the history collecting to other tools is more decoupled for operator who runs commercial service. Indeed both the ways would bring invasion to the orginal code, but it is unavoidable for this kind of feature.
-
baryluk commented at 6:47 PM on May 16, 2018: none
+1
Exposing a lot of internal counters and stats via prometheus compatible API and HTTP, would be make it a lot easier to monitor
bitcoindin production environment, and setup monitoring alerts. (i.e. leveldb log sizes, high processing latency of REST APIs, etc).Even if one doesn't use prometheus, but different monitoring system, it should be VERY easy to write adapter as prometheus metric access system is very simple but at the same time rich.
Having statistics like that also provides opportunities for optimizations, by better understanding behaviour of the code in production. (i.e. cache hit rates, various failure counters, etc), as well instrument code with counters and gauges in consistent way, that can be used both for monitoring, alerting, but also testing.
It is a core feature, and do not constitute a fork in any reasonable way.
-
laanwj commented at 11:56 AM on January 26, 2021: member
See also discussion here #20981 (comment)
-
pinheadmz commented at 1:42 PM on April 27, 2023: member
This issue is unlikely to be fixed in Bitcoin Core. We'll close for now, but feel free to open another issue or pull request with a fix.
- pinheadmz closed this on Apr 27, 2023
- bitcoin locked this on Apr 26, 2024