The UptimeBot is responsible for automatically managing our Uptime-Kuma installation.
787
This repository contains the dockerfile (and PHP source code) for building our 'UptimeBot'. The UptimeBot is responsible for automatically managing our Uptime-Kuma installation when changes occur in one of the backends.
The tasks that the UptimeBot automates are:
Tags: While Uptime-Kuma supports tags, the Web-API that we use doesn't. The code is ready for use with tags, but until the API supports it we can't do shit about it.
Manual changes: The UptimeBot will remove all the hosts that you manually add unless they start with a dot (.). We would love to work with Tags so that the UptimeBot can 'remember' what hosts are managed by the UptimeBot. However, as you can read above, tags are not yet supported by the API.
While the UptimeBot is capable of plug'n'play different types of backends and logging services(by extending the abstract classes and re-building the image), this current version only implements the following services:
This image is only an implementation of the UptimeBot itself. This means that the actual Uptime Kuma instance and the Web-API need to be run as a standalone Docker image (or on the host directly). Also, we ofcourse assume that you already have a working implementation of (at least) one backend server (Traefik or Virtualmin) and that this server is reachable by the (future) UptimeBot server.
novinem/uptimebot.docker run --rm novinem/uptimebot -v ...
docker compose up---
version: '3'
services:
uptimebot_kuma:
container_name: uptime-kuma
image: louislam/uptime-kuma:latest
ports:
- "3001:3001"
restart: always
volumes:
- uptime-kuma:/app/data
uptimebot_api:
container_name: uptimebot_api
image: novinem/uptime-kuma-web-api:latest
volumes:
- api-db:/db
restart: always
environment:
- KUMA_SERVER=http://uptimebot_kuma:3001
- KUMA_USERNAME=<username>
- KUMA_PASSWORD=<username>
- ADMIN_PASSWORD=<choose_api_admin_pass>
- ACCESS_TOKEN_EXPIRATION=1440
depends_on:
- uptimebot_kuma
uptimebot_autoconfig:
image: novinem/uptimebot:latest
container_name: uptimebot_autoconfig
volumes:
# Bind mounts (dynamic config)
- ./mounts/dynamic-config:/usr/src/dynamic_config
depends_on:
- uptimebot_api
restart: unless-stopped
volumes:
uptime-kuma:
name: uptime-kuma
api-db:
name: api-db
# |||||||||||||||||||||||||||||||||||||
# |
# | Dynamic configuration
# |
# |||||||||||||||||||||||||||||||||||||
monitor_only_main_domain: true
monitor_clean_on_startup: true
# These settings have to match the docker compose
api_url: http://uptimebot_api:8000/
api_admin_password: admin
continuous: false
continuous_delay_ms: 30000
# You can use multiple loggers at once.
# The different values for 'log_level' are: debug, info, warning, error, fatal
# The 'backends' parameter accepts an array of names for backends (name) to which this logger applies. If this array is empty, then this logger will only log non-backend specific errors.
loggers:
- type: slack
backends: []
log_level: debug
type_meta:
slack_webhook_url: https://hooks.slack.com/...
- type: slack
backends: [backend_name]
log_level: debug
type_meta:
slack_webhook_url: https://hooks.slack.com/...
# 'name' is the name of the backend you want to give it for reference.
# 'traefik_router_exclusions' needs to be an array with the names of the routers that need to be excluded.
backends:
- name: test_vmin
type: virtualmin
type_meta:
virtualmin_api_url: https://<backend_ip>:10000
virtualmin_root_password: ROOT_PASSWORD
- name: backend_name
type: traefik
type_meta:
traefik_api_url: http://<backend_ip>:8080
traefik_router_exclusions:
- dashboard@internal
- api@internal
# |||||||||||||||||||||||||||||||||||||
# |
# | Static configuration
# |
# | !! (IMPORTANT) These files and paths are hardcoded in the image and exist only in this config for future reference.
# | So, only change this if you know what you are doing.
# |
# |||||||||||||||||||||||||||||||||||||
dynamic_config_dir: /usr/src/dynamic_config
Content type
Image
Digest
sha256:8911f950c…
Size
125.6 MB
Last updated
11 months ago
docker pull novinem/uptimebot