1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00
electrs/doc/monitoring.md

23 lines
505 B
Markdown
Raw Normal View History

2021-10-21 08:51:59 +02:00
## Monitoring
2023-01-27 16:21:11 +01:00
Indexing and serving metrics are exported via [Prometheus](https://github.com/tikv/rust-prometheus):
2021-10-21 08:51:59 +02:00
```bash
$ sudo apt install prometheus
2023-01-27 16:21:11 +01:00
```
Add `electrs` job to `scrape_configs` section in `/etc/prometheus/prometheus.yml`:
```
2021-10-21 08:51:59 +02:00
- job_name: electrs
static_configs:
- targets: ['localhost:4224']
2023-01-27 16:21:11 +01:00
```
Restart and check the collected metrics:
```
2021-10-21 08:51:59 +02:00
$ sudo systemctl restart prometheus
$ firefox 'http://localhost:9090/graph?g0.range_input=1h&g0.expr=index_height&g0.tab=0'
```