Add a systemd unit file + default with flags
This commit is contained in:
29
README.md
29
README.md
@@ -47,6 +47,35 @@ scrape_configs:
|
||||
- targets: ['localhost:9781']
|
||||
```
|
||||
|
||||
## systemd
|
||||
|
||||
A unit file and defaults file are included.
|
||||
|
||||
```sh
|
||||
# install binary
|
||||
go build -o /usr/local/bin/ctlog-uptime-exporter .
|
||||
|
||||
# install defaults (edit to taste)
|
||||
cp ctlog-uptime-exporter.default /etc/default/ctlog-uptime-exporter
|
||||
|
||||
# install and start the service
|
||||
cp ctlog-uptime-exporter.service /etc/systemd/system/
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now ctlog-uptime-exporter
|
||||
```
|
||||
|
||||
Runtime flags are controlled via the `ARGS` variable in `/etc/default/ctlog-uptime-exporter`.
|
||||
|
||||
## Grafana dashboard
|
||||
|
||||
`dashboard.json` can be imported directly into Grafana (Dashboards -> Import).
|
||||
It expects a Prometheus datasource and provides:
|
||||
|
||||
- Summary stats: number of logs, endpoint types, average uptime, degraded count, fetch status, last fetch time
|
||||
- Variable selectors for Log URL and Endpoint (both multi-select with All)
|
||||
- Time series panel showing the rolling 24h uptime ratio over the chosen time range
|
||||
- Table of the top N least-available log/endpoint pairs (N is selectable: 5, 10, 25, 50)
|
||||
|
||||
## License
|
||||
|
||||
Apache 2.0 - see [LICENSE](LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user