A simple network latency and packet loss monitor, with beautiful graphs in Grafana!
Zero external dependencies!
- Clone this repo locally where you have space to host the data gathered (one GB should be plenty!)
- Install Docker 17.12.0+ (preferably 18.02.0+)
- Install the latest Docker Compose
- Create directories for data for storage (in the cloned directory):
mkdir grafana-data prometheus-data
- If your Docker host is running Linux, you'll also need the following:
chown 472 grafana-data
NOTE for RaspberryPi 3/4: Please update the docker-compose.yaml
and use the nefilim/pinger_arm64:1.1
image instead
- Modify
etc/application.conf
to include the hosts you want to monitor - Start all the services with:
docker-compose up -d
(it will start containers for Pinger, Grafana, Prometheus) - Check the Pinger logs to make sure your configuration were picked up:
docker-compose logs pinger
You want to see something like:
pinger | 23:34:33.803 [main] INFO o.n.p.Main$ - Creating PingController for host [4.2.2.2] in network [public]
reflecting your configuration.
Your Grafana & Prometheus data will be stored on your docker host in ./grafana-data
and prometheus-data
. This should allow you to preserve your dashboard configurations and data while upgrading or recreating the Grafana & Prometheus containers.
- Login to the Grafana console at http://your_docker_host:3000 with the default credentials, username: admin password: admin
- Change the admin credentials or click Skip
- Click on
New dashboard
- In the New Panel pane, select Graph
- Hover over the graph and press
e
to edit it - In the
Data Source
dropdown under the Metrics tab, selectPingerPrometheus
- In the Metrics tab for Series A enter the following prometheus query:
average_latency{network="internal"}
- In the Legend format box below enter:
{{host}}
- In the General Tab enter a suitable title
Internal Latency
- Click
X
on the far right of the Graph pane to close it - At the top right, click the Add panel button (
+
) and select graph - Repeat the last process but this time for packet loss using query (
average_packetloss{network="X"}
)- I like to set the Y axis minimum explicitly to 0 for packet loss (Axes tab, Left Y, Y-min = 0)
- Repeat steps 4 - 12 for additional networks
- IMPORTANT: save your new dashboard with Cmd+S / Ctrl+S
-
The original: SmokePing https://oss.oetiker.ch/smokeping/
- perl & RRD .. 'nuff said
-
The healthy alternative: Vaping https://github.com/20c/vaping
- unreasonably high CPU usage for me 20c/vaping#33
- requires manual installation of frameworks and dependencies, no isolation
- probably more functionality than I needed