|
| 1 | +# Litestream Grafana Dashboard |
| 2 | + |
| 3 | +This directory contains a Grafana dashboard for monitoring Litestream metrics. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +1. Litestream configured with metrics endpoint enabled in `litestream.yml`: |
| 8 | + |
| 9 | + ```yaml |
| 10 | + addr: ":9090" |
| 11 | + ``` |
| 12 | +
|
| 13 | +2. Prometheus configured to scrape Litestream metrics: |
| 14 | +
|
| 15 | + ```yaml |
| 16 | + scrape_configs: |
| 17 | + - job_name: 'litestream' |
| 18 | + static_configs: |
| 19 | + - targets: ['localhost:9090'] |
| 20 | + ``` |
| 21 | +
|
| 22 | +3. Grafana with Prometheus data source configured |
| 23 | +
|
| 24 | +## Installation |
| 25 | +
|
| 26 | +1. Open Grafana and navigate to **Dashboards** → **Import** |
| 27 | +2. Upload the `litestream-dashboard.json` file or paste its contents |
| 28 | +3. Select your Prometheus data source |
| 29 | +4. Click **Import** |
| 30 | + |
| 31 | +## Metrics Included |
| 32 | + |
| 33 | +The dashboard monitors the following key metrics: |
| 34 | + |
| 35 | +- **Database & WAL Size**: Current size of the database and Write-Ahead Log |
| 36 | +- **Total WAL Bytes Written**: Cumulative bytes written to shadow WAL |
| 37 | +- **Sync Operations**: Rate of sync operations and any sync errors |
| 38 | +- **Sync Duration**: Time spent syncing shadow WAL |
| 39 | +- **Checkpoint Operations**: Rate of checkpoint operations by mode |
| 40 | +- **Checkpoint Errors**: Any checkpoint errors that occur |
| 41 | +- **Transaction ID**: Current transaction ID for each database |
| 42 | +- **Replica Operations**: Operations performed by replica type (GET/PUT) |
| 43 | +- **Replica Throughput**: Bytes transferred by replica operations |
| 44 | + |
| 45 | +## Configuration |
| 46 | + |
| 47 | +The dashboard uses template variables: |
| 48 | + |
| 49 | +- `datasource`: Select your Prometheus data source |
| 50 | +- `job`: Select the Prometheus job name (defaults to "litestream") |
| 51 | + |
| 52 | +## Support |
| 53 | + |
| 54 | +For issues or improvements to this dashboard, please open an issue at: |
| 55 | +<https://github.com/benbjohnson/litestream/issues> |
0 commit comments