Introduction
The SwarmAlert app monitors the availability of services running in a Docker Swarm environment.
It offers an optional WHITELIST of services to monitor. If a WHITELIST is not defined, ALL services in the Swarm are monitored by default.
An optional BLACKLIST is also configurable, and takes precedence over the whitelist and defaults. This is to allow you to use the BLACKLIST to avoid receiving alerts while doing planned maintenance. The app checks every CHECK_INTERVAL seconds. Upon checking, if a specified service has no running task, the app generates a Notification that is send to the services configured on the config.yml file. More information about the config.yml format is available on the apprise repository: apprise config yaml file reference
The Msg_Prefix is used to customize the message send to the notification providers.
Note: This project is based on monitor-docker-slack
General Idea
Usage: Docker-compose
version: '3'
services:
swarm-alert:
image: gpulidodt/swarm-alert:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /path_to_config/config.yml:/src/config.yml
environment:
- PUSHOVER_USER_KEY: user_key_from_pushover
- PUSHOVER_API_TOKEN: your_app_token_from_pushover
- MSG_PREFIX: '$MSG_PREFIX'
- WHITE_LIST: ''traefik_traefik','plex_plex','test_service''
- BLACK_LIST: ''test_service''
- LOGGING_LEVEL: INFO | DEBUG
Further customization
Code is licensed under MIT license
Author: gpulido
Source: https://github.com/gpulido/SwarmAlert
License: Unknown and 2 other licenses found