An open API service indexing awesome lists of open source software.

https://github.com/latchmihay/edge-pinger

Ping's hostnames in an interval and provides a prometheus endpoint with the metrics
https://github.com/latchmihay/edge-pinger

metrics pinger pings prometheus prometheus-endpoint

Last synced: 5 months ago
JSON representation

Ping's hostnames in an interval and provides a prometheus endpoint with the metrics

Awesome Lists containing this project

README

          

Small utility that pings a list or domain names and serves a prometheus endpoint with the results.
Prometheus metrics are at `:8080/metrics`

##### Example Configuration:
```hcl
count = 5
timeout = "10s"
interval = "60s"
addresses = [
"google.com",
"facebook.com",
"github.com",
]
```

##### Options:
```console
-config string
Path to edge pinger configuration file
-debug
Debug (default: false)
-port int
Port to listen for Prometheus requests (default 8080)
```

## How to run:
```console
$ go run main.go --config example/edge-pinger-configuration.hcl
2019/08/22 17:39:27 Initiating a ping loop for google.com Count=5 Timeout=10s Interval=1m0s
2019/08/22 17:39:27 Initiating a ping loop for facebook.com Count=5 Timeout=10s Interval=1m0s
2019/08/22 17:39:27 Initiating a ping loop for github.com Count=5 Timeout=10s Interval=1m0s
2019/08/22 17:39:27 Listening on :8080
```

### How to run in container:
```console
docker run --sysctl net.ipv4.ping_group_range="0 2147483647" -p 8080:8080 -v $(pwd)/example/edge-pinger-configuration.hcl:/config.hcl quay.io/latchmihay/edge-pinger:latest --config /config.hcl --debug
```