> For the complete documentation index, see [llms.txt](https://pao.peerplays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pao.peerplays.com/peerplays-2.0/key-metrics.md).

# Key Metrics

## Monitoring setup

Please refer to the substrate node guide to set up monitoring.

{% embed url="<https://docs.substrate.io/tutorials/build-a-blockchain/monitor-node-metrics/>" %}

## Hardware requirements

Before starting the node, check that the system has at least 2GiB of free space

During node startup pay attention to the host performance check there will be entries in the log with the current hardware score

&#x20;   🏁 CPU score:\
&#x20;   🏁 Memory score: \
&#x20;   🏁 Disk score (seq. writes): \
&#x20;   🏁 Disk score (rand. writes):&#x20;

In case of insufficient resources, there will be a message:

{% hint style="danger" %}
&#x20;⚠️ The hardware does not meet the minimal requirements for the role of 'Authority'.
{% endhint %}

## Important metrics to monitor

1. Block construction time should not be more than 5 seconds

**Metrics:**&#x20;

```
substrate_proposer_block_constructed_bucket
```

**Usage example with Prometheus:**

{% code overflow="wrap" %}

```promql
histogram_quantile(0.90, sum(rate(substrate_proposer_block_constructed_bucket[5m])) by (le))
```

{% endcode %}

2. 'Finalized' chain shouldn't lag behind 'best' for more than 10 blocks ('best' - 'finalized' < 10)

**Metrics:**

```
substrate_block_height{status="best"} 
substrate_block_height{status="finalized"}
```

**Usage example with Prometheus:**

{% code overflow="wrap" %}

```promql
sum by (name, instance) (substrate_block_height{status="best", chain="testnet"}) - sum by (name, instance)(substrate_block_height{status="finalized", chain="testnet"})
```

{% endcode %}

3. Number of connected peers should be more than 0 and depends on network size. On large networks, it will be limited by libp2p default value of 300.

**Metrics:**

```
substrate_sub_libp2p_peers_count
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://pao.peerplays.com/peerplays-2.0/key-metrics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
