Skip to content

Commit f0fef0b

Browse files
committed
extend docker tutorial docs with monitoring
1 parent 75f3a3d commit f0fef0b

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

docs/docs/getting-started.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,49 @@ This will start a full-blown terminal interface loaded with signing keys corresp
9898
Using the terminal interface of any node, you can now `[i]nit` the Hydra head and `[c]ommit` pre-distributed funds to it. Note that these steps are near-instant as the devnet is producing blocks much faster than a public testnet or the mainnet. After committing from all nodes, the head will automatically open, and you can also use the `hydra-tui` or the API to create new transactions and submit them to the Hydra head.
9999

100100
![](./open-head.png)
101+
102+
## Monitoring
103+
104+
We provide a minimal monitoring setup using Prometheus and Grafana to give you insight into the node's activity, including snapshot processing and peer connectivity.
105+
106+
:::info Note
107+
This setup focuses solely on the metrics exposed by the Hydra nodes and does not cover system-level metrics like CPU, memory, disk, or network usage.
108+
:::
109+
110+
Hydra nodes expose [Prometheus](https://prometheus.io/)-compliant _metrics_ through an HTTP server, available on the standard `/metrics` endpoint.
111+
112+
:::info Shortcut
113+
Reference the [Operating Hydra nodes guide](./how-to/operating-hydra.md#monitoring) for a more in-depth explanation on available metrics.
114+
:::
115+
116+
### Start the monitoring stack
117+
118+
Bring up Prometheus and Grafana:
119+
120+
```shell
121+
docker compose up -d prometheus grafana
122+
```
123+
124+
Prometheus will scrape the `/metrics` endpoint of each Hydra node automatically.
125+
126+
Grafana is preconfigured with a minimal dashboard visualizing key metrics from each node:
127+
128+
| Panel | Metric | Description |
129+
| ---------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------- |
130+
| **Hydra Head Confirmed Tx** | `hydra_head_confirmed_tx` | Number of snapshots confirmed by the Hydra head |
131+
| **Hydra Head Inputs** | `hydra_head_inputs` | Number of inputs processed by the head |
132+
| **Hydra Head Tx Confirmation Time (ms)** | `hydra_head_tx_confirmation_time_ms` | Average time taken to confirm snapshots on the Hydra head (from request to confirmation) |
133+
| **Peer Connected** | `hydra_head_peers_connected` | Number of peers each node is currently connected to |
134+
| **Hydra Head Requested** | `hydra_head_requested_tx` | Number of requested transactions received by the node (incoming ReqTx messages) |
135+
136+
### Using Grafana
137+
138+
1. Open Grafana in your browser at `http://localhost:3000`.
139+
2. Default login credentials are `admin/admin`.
140+
3. Explore the preconfigured dashboard or create your own panels using Prometheus queries.
141+
4. Use the top-left `instance` dropdown to inspect metrics per Hydra node.
142+
5. Hover on any graph or stat panel to see per-node values in real time.
143+
144+
### Dashboard Preview
145+
146+
![](./monitoring.png)

docs/docs/monitoring.png

452 KB
Loading

0 commit comments

Comments
 (0)