docker-swarm.sh - Docker
Author | Niels Haedecke |
---|---|
Compatibility | Xymon 4.3 |
Requirements | Bash, Docker >= 1.12 |
Download | https://github.com/ufud-org/docker-swarm.sh |
Last Update | 2017-05-30 |
Description
This Xymon script provides a status monitor for your docker containers running in docker swarm mode (requires docker >= 1.12). It requires that a xymon client is installed on your docker swarm manager node.
Installation
Client side
1.) copy docker-swarm.sh to the xymon client 'ext' directory on your docker swarm manager node (e.g. /usr/lib/xymon/client/ext on Debian based Linux distributions).
2.) copy docker-swarm.cfg to the xymon client 'etc' directoy on your docker swarm manager node (e.g. /usr/lib/xymon/client/etc on Debian based Linux distributions).
3.) after copying, edit docker-swarm.cfg to your needs by adding/modifying the service names you want the script to check on the cluster, one service name per line. As an example, preconfigured docker-swarm.cfg already contains some service names (mariadb, git, etc.).
4.) add the following lines to your clientlaunch.cfg on your docker swarm manager node (on Debian based distributions you can find it at /usr/lib/xymon/client/etc/clientlaunch.cfg):
[swarm] ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg CMD $XYMONCLIENTHOME/ext/docker-swarm.sh LOGFILE $XYMONCLIENTHOME/logs/hobbitclient.log INTERVAL 1m
5.) add the xymon user to the docker group (example for Debian based distributions):
usermod -aG docker xymon
6.) restart the xymon client on your swarm manager node.
Server side
Nothing
Source
docker-swarm.sh
docker-swarm.cfg
Known Bugs and Issues
To Do
Credits
Changelog
- 2017-05-30
- Initial release