Skip to content

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

Notifications You must be signed in to change notification settings

latchmihay/edge-pinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:
count = 5
timeout = "10s"
interval = "60s"
addresses = [
  "google.com",
  "facebook.com",
  "github.com",
]
Options:
  -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:

$ 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:

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published