this might work, idk i just making things up

This commit is contained in:
2025-10-20 15:40:46 -06:00
parent 714b69963b
commit 6e5fd2daee

View File

@@ -18,3 +18,18 @@ unit="F", computer="computer5"
From here you could then redirect stdout into a file, then host the file with something like Caddy for Prometheus to scrape.
## Examples
A simple "down detector"
```bash
cat metadata | generate_metrics cloudflare $(ping -c 1 1.1.1.1 &> /dev/null ; echo $?) > /srv/metrics/cloudflare
```
```caddyfile
metics.*:80 {
fileserver /srv/metrics/cloudflare
}
```