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
- Host: GitHub
- URL: https://github.com/latchmihay/edge-pinger
- Owner: latchmihay
- Created: 2019-08-22T21:37:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-24T14:05:40.000Z (almost 7 years ago)
- Last Synced: 2023-02-26T11:26:30.163Z (over 3 years ago)
- Topics: metrics, pinger, pings, prometheus, prometheus-endpoint
- Language: Go
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```