https://github.com/acj/pinger
Simple tool for repeatedly pinging a host and reporting the round-trip time to Datadog
https://github.com/acj/pinger
Last synced: 12 months ago
JSON representation
Simple tool for repeatedly pinging a host and reporting the round-trip time to Datadog
- Host: GitHub
- URL: https://github.com/acj/pinger
- Owner: acj
- License: mit
- Created: 2018-04-07T20:41:00.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-07T20:53:46.000Z (about 8 years ago)
- Last Synced: 2025-01-04T09:08:46.670Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pinger
Pings a host reapeatedly and reports the round-trip times to Datadog.
## Getting Started
#### Bare Metal
```
$ go get github.com/DataDog/datadog-go/statsd
$ go get github.com/tatsushid/go-fastping
$ go build pinger.go
$ ./pinger
```
If you're running pinger as a non-root user, you may need to use `sudo ./pinger` because the ICMP pings require raw socket access.
#### Docker
```
$ docker pull acjensen/pinger
$ docker run -it pinger
```
### Configuring
```
$ ./pinger -h
Usage of ./pinger:
-interval int
Ping interval in milliseconds. Also serves as timeout. (default 2000)
-metric string
Metric name (default "udp_ping")
-namespace string
StatsD namespace for metrics (default "pinger.")
-ping_host string
The host to ping (default "localhost")
-statsd_host string
The StatsD host and port to use for metrics (default "0.0.0.0:8125")
```
Options can be passed to Docker with `-e`, for example:
```
$ docker run -it -e STATSD_HOST=192.168.1.10:8125 pinger
```