Collect node's metrics in Prometheus format #10887

issue hyperwang opened this issue on July 20, 2017
  1. hyperwang commented at 6:35 AM on July 20, 2017: none

    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.

  2. windsok commented at 2:15 AM on July 21, 2017: contributor
  3. 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.

  4. jonasschnelli added the label Feature on Jul 21, 2017
  5. hyperwang commented at 7:38 AM on July 21, 2017: none

    @windsok Yes, that's the feature I want and appreciate the maintainer. Have noticed that the code base not follow new release very promptly.

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

  7. 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 bitcoind in 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.

  8. laanwj commented at 11:56 AM on January 26, 2021: member

    See also discussion here #20981 (comment)

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

  10. pinheadmz closed this on Apr 27, 2023

  11. bitcoin locked this on Apr 26, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 12:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me