Monitor your network. Includes Slave mode, Web only mode, Ping only mode and autoupdates.
2.5K
Smokeping keeps track of your network latency. For a full example of what this application is capable of visit UCDavis. The LinuxServer.io Smokeping docker image is great. However it uses APT to install Smokeping. This is not the most recent version of Smokeping. So I've extended the base Linuxservice image with instructions to download the latest Smokeping and install it over the default Smokeping.
For more information on using this image - please see divyavanmahajan/smokeping
In addition to LinuxServer I have included a few extra environment variables.
NO_UPDATE=1 - Do not run the smokeping update when the container starts. This is useful if the container cannot access the Internet. NO_WEB=1 - Only start the Smokeping part without the HTTP server. This will collect the data but will not display it. NO_PING=1 - Only start the Apache HTTP server and do not ping. For this to work, this container must share the data and config folders with a NO_WEB=1 container.
If you want the container to run in Slave mode specify these variables. Use the docker option "-h hostname" to give your container the name used to lookup your Slaves configuration. SLAVE_SECRET - The secret shared key in your Slaves config file. MASTER_URL - URL to contact the main server for the config file
Here are some example snippets to help you get started creating a container.
docker create \
--name=smokeping \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/London \
-p 80:80 \
-v </path/to/smokeping/config>:/config \
-v </path/to/smokeping/data>:/data \
--restart unless-stopped \
divyavanmahajan/smokeping
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.
| Parameter | Function |
|---|---|
-p 80 | Allows HTTP access to the internal webserver. |
-e PUID=1001 | for UserID - see below for explanation |
-e PGID=1001 | for GroupID - see below for explanation |
-e TZ=Europe/London | Specify a timezone to use EG Europe/London |
-e NO_UPDATE=1 | Do not run the smokeping update when the container starts. This is useful if the container cannot access the Internet. |
-e NO_WEB=1 | Only start the Smokeping part without the HTTP server. This will collect the data but will not display it. |
-e NO_PING=1 | Only start the Apache HTTP server and do not ping. For this to work, this container must share the data and config folders with a NO_WEB=1 container. |
-e SLAVE_SECRET=123 | SLAVE mode required: The secret shared key in your Slaves config file. |
-e MASTER_URL=http://master:3333/smokeping/smokeping.cgi | SLAVE mode required: URL to contact the main server for the config file |
-h container_hostname | SLAVE mode required: Give your container the hostname it will use to contact the master server. This hostname is used in the Slaves configuration. |
-v /config | Configure the Targets file here |
-v /data | Storage location for db and application data (graphs etc) |
-v /cache | Storage location for the cache images etc) |
When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance PUID=1001 and PGID=1001, to find yours use id user as below:
$ id username
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
http://<host-ip>/.Targets file to ping the hosts you're interested in to match the format found there.docker create \
--name=master \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/London \
-p 80:80 \
-v </path/to/smokeping/config>:/config \
-v </path/to/smokeping/data>:/data \
-v </path/to/smokeping/cache>:/cache \
--restart unless-stopped \
divyavanmahajan/smokeping
docker create \
--name=slave \
-h slave1
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/London \
-e NO_WEB=1
-e SLAVE_SECRET=12345678
-e MASTER_URL=http://master/smokeping/smokeping.cgi
--restart unless-stopped \
divyavanmahajan/smokeping
The master is split into masterping and masterweb. The container masterping - will collect the data. The container masterweb will show the web frontend. For this to work correctly, the two containers should share the config and data volumes.
docker create \
--name=masterping \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/London \
-e NO_WEB=1
-v </path/to/smokeping/config>:/config \
-v </path/to/smokeping/data>:/data \
-v </path/to/smokeping/cache>:/cache \
--restart unless-stopped \
divyavanmahajan/smokeping
docker create \
--name=masterweb \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/London \
-e NO_PING=1
-p 80:80 \
-v </path/to/smokeping/config>:/config \
-v </path/to/smokeping/data>:/data \
-v </path/to/smokeping/cache>:/cache \
--restart unless-stopped \
divyavanmahajan/smokeping
docker create \
--name=slave \
-h slave1
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/London \
-e NO_WEB=1
-e SLAVE_SECRET=12345678
-e MASTER_URL=http://master/smokeping/smokeping.cgi
--restart unless-stopped \
divyavanmahajan/smokeping
---
version: "3.4"
services:
smokeping:
image: divyavanmahajan/smokeping
container_name: smokeping
environment:
- PUID=1001
- PGID=1001
- TZ=Europe/London
volumes:
- </path/to/smokeping/config>:/config
- </path/to/smokeping/cache>:/cache
- </path/to/smokeping/data>:/data
ports:
- 80:80
restart: unless-stopped
docker exec -it smokeping /bin/bashdocker logs -f smokepingdocker inspect -f '{{ index .Config.Labels "build_version" }}' smokepingdocker inspect -f '{{ index .Config.Labels "build_version" }}' divyavanmahajan/smokepingBelow are the instructions for updating containers:
docker pull divyavanmahajan/smokepingdocker stop smokepingdocker rm smokeping/config folder and settings will be preserved)docker start smokepingdocker image prunedocker-compose pull divyavanmahajan/smokepingdocker-compose up -ddocker image pruneContent type
Image
Digest
Size
118.6 MB
Last updated
about 5 years ago
docker pull divyavanmahajan/smokeping