this might work, idk i just making things up
This commit is contained in:
15
README.md
15
README.md
@@ -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
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user