Go-ethereum: Which kinds of info does debug.metrics(false) give ?

Created on 16 Oct 2017  路  8Comments  路  Source: ethereum/go-ethereum

System information

Geth version: any
OS & Version: Windows/Linux/OSX
Commit hash : NA

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

So what kind of event stats information does debug.metrics() provide, is it related to blocks per second, reads and writes to smart contracts in terms of disk io metrics or something else ?

Most helpful comment

Sure. We run with these params: --metrics --pprof --pprofaddr=0.0.0.0, and use a go-expvar datadog thingy configured like this:

init_config:

instances:
  - expvar_url: "http://127.0.0.1:6060/debug/metrics"
    namespace: "geth"
    tags:
      - "client:geth"
    metrics:
      - path: chain.*
        type: counter
      - path: trie.cachemiss
      - path: trie.cacheunload
      - path: txpool.*
      - path: p2p.*
      - path: les.*
- path: eth.downloader.*

You can take a peek at http://127.0.0.1:6060/debug/metrics with curl to see what stats you can choose from.

All 8 comments

Ideally ask technical questions on https://ethereum.stackexchange.com - it's important to keep issue trackers clear and for real issues only.

See https://github.com/ethereum/go-ethereum/wiki/Metrics-and-Monitoring for a start (and for documentation), and which has a section on how to create your own metrics.

I think those APIs have been a bit neglected since we don't currently have a nice enough visualization tool to make proper heads or tails of them. We'll probably revising them eventually. Currently they are used by the datadog monitoring services.

If you run Geth with --metrics and call debug.metrics(), you'll pretty much see all the available metrics that we collect.

@karalabe could you share a bit more details how you are using datadog to collect data from geth API?

@holiman @Arachnid ^ ?

Sure. We run with these params: --metrics --pprof --pprofaddr=0.0.0.0, and use a go-expvar datadog thingy configured like this:

init_config:

instances:
  - expvar_url: "http://127.0.0.1:6060/debug/metrics"
    namespace: "geth"
    tags:
      - "client:geth"
    metrics:
      - path: chain.*
        type: counter
      - path: trie.cachemiss
      - path: trie.cacheunload
      - path: txpool.*
      - path: p2p.*
      - path: les.*
- path: eth.downloader.*

You can take a peek at http://127.0.0.1:6060/debug/metrics with curl to see what stats you can choose from.

@holiman thanks guys!

This is much awesome

Was this page helpful?
0 / 5 - 0 ratings