Smokeping docker container
SmokePing keeps track of your network latency:
- Best of breed latency visualisation.
- Interactive graph explorer.
- Wide range of latency measurment plugins.
- Master/Slave System for distributed measurement.
- Highly configurable alerting system.
- Live Latency Charts with the most 'interesting' graphs.
When started the smokeping web inteface will listen on port 80 in the container at the '/smokeping/smokeping.cgi' URI.
sudo docker run -it --name smokeping -p 8000:80 -d dperson/smokeping
sudo docker run -it --rm dperson/smokeping -h
Usage: smokeping.sh [-opt] [command]
Options (fields in '[]' are optional, '<>' are required):
-h This help
-c "<count>" Configure the default ping count
possible arg: \"[integer]\" - ping count
-g "<user;pass>" Configure ssmtp so that email alerts can be sent
required arg: "<user>" - your gmail username
required arg: "<pass>" - your gmail password of app password
These are only set in your docker container
-e "<email>" Configure email address for owner of smokeping
required arg: "<email>" - your email address
-o "<name>" Configure name of the owner of smokeping
required arg: "<name>" - your name
-s "<step>" Configure the time step for DB entries
possible arg: \"[integer]\" - time step in seconds
-t "<site;name;target>[;alert]" Configure smokeping targets
required arg: "<site>" - name for site of tests
required arg: "<name>" - name for check
required arg: "<target>" - hostname or IP to check
Targets can also be http:// or https:// URLs
possible arg: "[alert]" - send emails on failures (any val)
-T "" Configure timezone
possible arg: "[timezone]" - zoneinfo timezone for container
-w Wipe the targets clean
The 'command' (if provided and valid) will be run instead of smokeping
ENVIRONMENT VARIABLES
SPUSER
- If set use named user instead of 'smokeping' (for example root)WIPE
- If set will wipe all targetsSSMTP_GMAIL
As above configure ssmtp for gmail, set touser;pass
EMAIL
- As above, your email address as the ownerbob@example.net
OWNER
- As above, your name as the ownerBob Hope
PING
- As above, the number of pings to trySTEP
- As above, the time step for DB entriesTARGET
- As above a target to check, set tosite;name;target[;alert]
TZ
- As above, configure the zoneinfo timezone, IEEST5EDT
USERID
- Set the UID for the app userGROUPID
- Set the GID for the app userDEBUG
- Run smokeping in debug mode
Any of the commands can be run at creation with docker run
or later with
docker exec -it smokeping smokeping.sh
(as of version 1.3 of docker).
sudo docker run -it -p 8000:80 -d dperson/smokeping -T EST5EDT
OR using environment variables
sudo docker run -it -p 8000:80 -e TZ=EST5EDT -d dperson/smokeping
Will get you the same settings as
sudo docker run -it --name smokeping -p 8000:80 -d dperson/smokeping
sudo docker exec -it smokeping smokeping.sh -T EST5EDT \
ls -AlF /etc/localtime
sudo docker restart smokeping
IP=$(traceroute -n google.com |
egrep -v ' (10|172\.(1[6-9]|2[0-9]|3[01])|192.168)\.' |
awk '/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.*ms/ {print $2; exit}')
sudo docker run -it -p 8000:80 -d dperson/smokeping -w -t "ISP;NextHop;$IP"
OR
IP=$(traceroute -n google.com |
egrep -v ' (10|172\.(1[6-9]|2[0-9]|3[01])|192.168)\.' |
awk '/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.*ms/ {print $2; exit}')
sudo docker run -it -p 8000:80 -e WIPE=y -e TARGET="ISP;NextHop;$IP" \
-d dperson/smokeping
sudo docker exec -it smokeping smokeping.sh -t "<site;name;target>"
IE
sudo docker exec -it smokeping smokeping.sh -t "home;router;bob.dyndns.org"
sudo docker run -it -p 8000:80 -d dperson/smokeping \
-g "sampleuser;samplepass"
OR
sudo docker run -it -p 8000:80 -e SSMTP_GMAIL="sampleuser;samplepass" \
-d dperson/smokeping
sudo docker run -it -p 8000:80 -d dperson/smokeping \
-e "sampleuser@gmail.com"
OR
sudo docker run -it -p 8000:80 -e EMAIL="sampleuser@gmail.com" \
-d dperson/smokeping
sudo docker run -it -p 8000:80 -d dperson/smokeping -o "Sample User"
OR
sudo docker run -it -p 8000:80 -e OWNER="Sample User" -d dperson/smokeping
If you wish to adapt the default configuration, use something like the following to copy it from a running container:
sudo docker cp smokeping:/etc/smokeping /some/path
You can use the modified configuration with:
sudo docker run -it --name smokeping -p 8000:80 \
-v /some/path:/etc/smokeping:ro -d dperson/smokeping
If you are affected by this issue (a small percentage of users are) please try setting the SPUSER environment variable to root, IE:
sudo docker run -it --name smokeping -p 8000:80 -e SPUSER=root -d \
dperson/smokeping
If you have any problems with or questions about this image, please contact me through a GitHub issue.