document metrics (#713)

* document metrics

Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net>

* add vale accept words

Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net>

* move json rpc equivalents to definition column

Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net>
pull/718/head
Alexandra Tran 4 years ago committed by GitHub
parent 1a359f4278
commit 21f71ad9e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      CI/vale/vale_styles/Vocab/Besu/accept.txt
  2. 124
      docs/HowTo/Monitor/Metrics.md

@ -91,6 +91,7 @@ Nodejs
[oO]nboard(ing)?
[oO]nchain
Orion
[oO]wnable
[pP]arallelization
PegaSys
[pP]ermission(ing|ed)?
@ -123,6 +124,7 @@ Splunk
[sS]ubcommand(s)?
[sS]ubnet(s)?
[sS]uborganization(s)?
[sS]ynchronizer(s)?
Teku
Telegraf
[tT]estnet(s)?
@ -130,14 +132,16 @@ tmux
[tT]oolset(s)?
[tT]rie(s)?
[tT]ruststore(s)?
[uU]pcheck
[uU]ncache(d)?
underflow(s)?
[uU]nencode(d)?
[uU]nencrypt(ed)?
[uU]ncache(d)?
Unix
[uU]ntrust(ed)?
[uU]pcheck
[uU]pstream(s)?
[vV]alidator(s)?
Vertx
[vV]eto(s|es)?
Web
Web3Signer

@ -177,31 +177,105 @@ To configure Prometheus and run with Besu pushing to a push gateway:
1. Choose **Graph** from the menu bar and click the **Console** tab below.
1. From the **Insert metric at cursor** drop-down, select a metric such as
`besu_blockchain_difficulty_total` or `ethereum_blockchain_height` and click **Execute**. The
values display.
The following table lists the Standard Ethereum metrics, shown with the `ethereum_` prefix.
Metrics specific to Besu use the `besu_` prefix.
| Name | Metric Type | Definition | JSON-RPC Equivalent |
| --- | --- | --- | --- |
| `ethereum_blockchain_height` | Gauge | Current height of the canonical chain | `eth_blockNumber` |
| `ethereum_best_known_block_number` | Gauge | Estimated highest block available | `highestBlock` of `eth_syncing` or `eth_blockNumber`, if not syncing |
| `ethereum_peer_count` | Gauge | Current number of peers connected | `net_peerCount` |
| `ethereum_peer_limit` | Gauge | Maximum number of peers this node allows to connect | No equivalent |
!!! important
* The `ethereum_best_known_block_number` metric always has a value. When the
[`eth_syncing` JSON-RPC method](../../Reference/API-Methods.md#eth_syncing) returns
false, the current chain height displays.
* Although the `ethereum_peer_limit` metric does not have a JSON-RPC equivalent, the
[`max peers` command line option](../../Reference/CLI/CLI-Syntax.md#max-peers) sets the
maximum number of P2P connections that can be established.
Click the **Graph** tab to view the data as a time-based graph. The query string displays below
the graph. For example:
`{ethereum_blockchain_height{instance="localhost:9545",job="prometheus"}`
`besu_blockchain_difficulty_total` or `ethereum_blockchain_height` and click **Execute**.
The values display.
1. Click the **Graph** tab to view the data as a time-based graph. The query string displays below the graph.
For example: `{ethereum_blockchain_height{instance="localhost:9545",job="prometheus"}`
### Metrics list
The following table lists available metrics.
Metrics specific to Besu use the `besu_` prefix, and standard Ethereum metrics use the `ethereum_` prefix.
If a metric has a JSON-RPC equivalent, it is included in the definition column.
| Name | Metric Type | Definition |
| --- | --- | --- |
| `besu_blockchain_chain_head_gas_limit` | Gauge | Block gas limit of the current chain head block |
| `besu_blockchain_chain_head_gas_used` | Gauge | Gas used by the current chain head block |
| `besu_blockchain_chain_head_ommer_count` | Gauge | Number of uncles in the current chain head block (JSON-RPC equivalent: [`eth_getUncleCountByBlockHash`](../../Reference/API-Methods.md#eth_getunclecountbyblockhash) or [`eth_getUncleCountByBlockNumber`](../../Reference/API-Methods.md#eth_getunclecountbyblocknumber)) |
| `besu_blockchain_chain_head_timestamp` | Gauge | Timestamp from the current chain head |
| `besu_blockchain_chain_head_transaction_count` | Gauge | Number of transactions in the current chain head block (JSON-RPC equivalent: [`eth_getBlockTransactionCountByHash`](../../Reference/API-Methods.md#eth_getblocktransactioncountbyhash) or [`eth_getBlockTransactionCountByNumber`](../../Reference/API-Methods.md#eth_getblocktransactioncountbynumber)) |
| `besu_blockchain_difficulty_total` | Gauge | Difficulty of the chain head (JSON-RPC equivalent: `difficulty` of [`admin_peers`](../../Reference/API-Methods.md#admin_peers)) |
| `besu_executors_ethscheduler_computation_active_threads_current` | Gauge | Current number of threads executing computation tasks |
| `besu_executors_ethscheduler_computation_completed_tasks_total` | Gauge | Total number of computation tasks executed |
| `besu_executors_ethscheduler_computation_pool_size_current` | Gauge | Current number of threads in the computation thread pool |
| `besu_executors_ethscheduler_computation_queue_length_current` | Gauge | Current number of computation tasks awaiting execution |
| `besu_executors_ethscheduler_computation_rejected_tasks_total` | Counter | Total number of tasks rejected by this computation executor |
| `besu_executors_ethscheduler_computation_submitted_tasks_total` | Gauge | Total number of computation tasks submitted |
| `besu_executors_ethscheduler_timer_active_threads_current` | Gauge | Current number of threads executing timer tasks |
| `besu_executors_ethscheduler_timer_completed_tasks_total` | Gauge | Total number of timer tasks executed |
| `besu_executors_ethscheduler_timer_pool_size_current` | Gauge | Current number of threads in the timer thread pool |
| `besu_executors_ethscheduler_timer_queue_length_current` | Gauge | Current number of timer tasks awaiting execution |
| `besu_executors_ethscheduler_timer_rejected_tasks_total` | Counter | Total number of tasks rejected by this timer executor |
| `besu_executors_ethscheduler_timer_submitted_tasks_total` | Gauge | Total number of timer tasks submitted |
| `besu_executors_ethscheduler_workers_active_threads_current` | Gauge | Current number of threads executing worker tasks |
| `besu_executors_ethscheduler_workers_completed_tasks_total` | Gauge | Total number of worker tasks executed |
| `besu_executors_ethscheduler_workers_pool_size_current` | Gauge | Current number of threads in the worker thread pool |
| `besu_executors_ethscheduler_workers_queue_length_current` | Gauge | Current number of worker tasks awaiting execution |
| `besu_executors_ethscheduler_workers_rejected_tasks_total` | Counter | Total number of tasks rejected by this worker executor |
| `besu_executors_ethscheduler_workers_submitted_tasks_total` | Gauge | Total number of worker tasks submitted |
| `besu_network_discovery_inflight_interactions_current` | Gauge | Current number of inflight discovery interactions |
| `besu_network_discovery_interaction_count` | Counter | Total number of discovery interactions initiated |
| `besu_network_discovery_interaction_retry_count` | Counter | Total number of interaction retries performed |
| `besu_network_discovery_messages_inbound` | Counter | Total number of P2P discovery messages received |
| `besu_network_discovery_messages_outbound` | Counter | Total number of P2P discovery messages sent |
| `besu_network_netty_boss_pending_tasks` | Gauge | Number of pending tasks in Netty boss event loop |
| `besu_network_netty_workers_pending_tasks` | Gauge | Number of pending tasks in Netty workers event loop |
| `besu_network_p2p_messages_inbound` | Counter | Total number of P2P messages received |
| `besu_network_vertx_eventloop_pending_tasks` | Gauge | Number of pending tasks in Vertx event loop |
| `besu_network_vertx_worker_pool_completed_total` | Counter | Total number of tasks completed by Vertx worker pool |
| `besu_network_vertx_worker_pool_rejected_total` | Counter | Total number of tasks rejected by Vertx worker pool |
| `besu_network_vertx_worker_pool_submitted_total` | Counter | Total number of tasks submitted to Vertx worker pool |
| `besu_peers_connected_total` | Counter | Total number of peers connected |
| `besu_peers_disconnected_total` | Counter | Total number of peers disconnected |
| `besu_peers_pending_peer_requests_current` | Gauge | Current number of peer requests pending because peers are busy |
| `besu_synchronizer_chain_download_pipeline_restarts` | Counter | Number of times chain download pipeline has been restarted |
| `besu_synchronizer_in_sync` | Gauge | Whether or not the local node has caught up to the best known peer (1 or 0) |
| `besu_synchronizer_task` | Summary | Internal processing tasks |
| `besu_transaction_pool_pending_transactions_messages_skipped_total` | Counter | Total number of pending transactions messages skipped by the processor |
| `besu_transaction_pool_transactions` | Gauge | Current size of the transaction pool (JSON-RPC equivalent: result number of [`txpool_besuTransactions`](../../Reference/API-Methods.md#txpool_besutransactions)) |
| `besu_transaction_pool_transactions_added_total` | Counter | Count of transactions added to the transaction pool |
| `besu_transaction_pool_transactions_messages_skipped_total` | Counter | Total number of transactions messages skipped by the processor. |
| `ethereum_best_known_block_number` | Gauge | Estimated highest block available (JSON-RPC equivalent: `highestBlock` of [`eth_syncing`](../../Reference/API-Methods.md#eth_syncing), or [`eth_blockNumber`](../../Reference/API-Methods.md#eth_blocknumber) if not syncing) |
| `ethereum_blockchain_height` | Gauge | Current height of the canonical chain (JSON-RPC equivalent: [`eth_blockNumber`](../../Reference/API-Methods.md#eth_blocknumber)) |
| `ethereum_peer_count` | Gauge | Current number of peers connected (JSON-RPC equivalent: [`net_peerCount`](../../Reference/API-Methods.md#net_peercount)) |
| `ethereum_peer_limit` | Gauge | Maximum number of peers this node allows to connect |
| `jvm_buffer_pool_capacity_bytes` | Gauge | Bytes capacity of a given JVM buffer pool |
| `jvm_buffer_pool_used_buffers` | Gauge | Used buffers of a given JVM buffer pool |
| `jvm_buffer_pool_used_bytes` | Gauge | Used bytes of a given JVM buffer pool |
| `jvm_classes_loaded` | Gauge | Current number of classes loaded in the JVM |
| `jvm_classes_loaded_total` | Counter | Total number of classes loaded since the JVM started execution |
| `jvm_classes_unloaded_total` | Counter | Total number of classes unloaded since the JVM started execution |
| `jvm_gc_collection_seconds` | Summary | Seconds spent in a given JVM garbage collector |
| `jvm_memory_bytes_committed` | Gauge | Committed bytes of a given JVM memory area |
| `jvm_memory_bytes_init` | Gauge | Initial bytes of a given JVM memory area |
| `jvm_memory_bytes_max` | Gauge | Maximum bytes of a given JVM memory area |
| `jvm_memory_bytes_used` | Gauge | Used bytes of a given JVM memory area |
| `jvm_memory_pool_bytes_committed` | Gauge | Committed bytes of a given JVM memory pool |
| `jvm_memory_pool_bytes_init` | Gauge | Initial bytes of a given JVM memory pool |
| `jvm_memory_pool_bytes_max` | Gauge | Maximum bytes of a given JVM memory pool |
| `jvm_memory_pool_bytes_used` | Gauge | Used bytes of a given JVM memory pool |
| `jvm_threads_current` | Gauge | Current thread count of a JVM |
| `jvm_threads_daemon` | Gauge | Daemon thread count of a JVM |
| `jvm_threads_deadlocked` | Gauge | Cycles of JVM threads in deadlock waiting to acquire object monitors or ownable synchronizers |
| `jvm_threads_deadlocked_monitor` | Gauge | Cycles of JVM threads in deadlock waiting to acquire object monitors |
| `jvm_threads_peak` | Gauge | Peak thread count of a JVM |
| `jvm_threads_started_total` | Counter | Started thread count of a JVM |
| `jvm_threads_state` | Gauge | Current count of threads by state |
| `process_cpu_seconds_total` | Counter | Total user and system CPU time spent in seconds |
| `process_max_fds` | Gauge | Maximum number of open file descriptors |
| `process_open_fds` | Gauge | Number of open file descriptors |
| `process_start_time_seconds` | Gauge | Start time of the process since Unix epoch in seconds |
!!! important
* The `ethereum_best_known_block_number` metric always has a value. When the
[`eth_syncing` JSON-RPC method](../../Reference/API-Methods.md#eth_syncing) returns
false, the current chain height displays.
* Although the `ethereum_peer_limit` metric does not have a JSON-RPC equivalent, the
[`max peers` command line option](../../Reference/CLI/CLI-Syntax.md#max-peers) sets the
maximum number of P2P connections that can be established.
<!-- Links -->
[monitoring with Prometheus and Grafana configured]: ../../Tutorials/Examples/Private-Network-Example.md#monitoring-nodes-with-prometheus-and-grafana

Loading…
Cancel
Save