This repository contains the configuration and setup for a Gatus monitoring system. It includes service monitoring, alerting, and a PostgreSQL backend for storage.
- Service Monitoring: Monitor HTTP(S) endpoints, TCP connections, and more.
- Alerting: Configured with Pushover for notifications.
- PostgreSQL Storage: Persistent storage for monitoring data.
- Dynamic Configuration: Uses templates and environment variables for flexible setup.
- Dockerized Deployment: Fully containerized using
docker-compose.
- Docker and Docker Compose installed on your system.
- A Git repository with deploy key support for configuration synchronization.
git clone https://github.com/hueske-digital/gatus.git
cd gatusRun the following command to generate an SSH key for accessing the Git repository:
docker compose run --rm sshkeygeneratorAdd the generated key as a deploy key in your Git repository (the one with config files for the checks) with read-only access.
Start the monitoring stack using Docker Compose:
docker compose up -dThe Gatus dashboard will be available at http://<your-server-ip>:8080. Use the credentials configured in the .env file or the default (admin/admin).
Run the following command to generate the global.yaml configuration file:
docker compose up -d --force-recreateOR
docker compose run --rm gatus-globalconfigThe .env file contains the following configurable variables:
PUSHOVER_APP_TOKEN: Pushover application token for alerting.PUSHOVER_USER_KEY: Pushover user key for alerting.BASIC_AUTH_USERNAME: Username for the Gatus dashboard.BASIC_AUTH_PASSWORD: Password for the Gatus dashboard.GIT_REPO_URL: URL of the Git repository for configuration synchronization.POSTGRES_USER: PostgreSQL username.POSTGRES_PASSWORD: PostgreSQL password.POSTGRES_DB: PostgreSQL database name.SYNC_INTERVAL: Interval for syncing configuration from the Git repository.
Endpoint configurations are stored in the config/ directory. Each YAML file defines monitoring rules for specific services. Example:
endpoints:
- name: "Example Service"
url: "https://example.com"
group: public
interval: 60s
conditions:
- "[STATUS] == 200"
- "[RESPONSE_TIME] < 1000"The templates/ directory contains the global.tpl.yaml file, which dynamically generates the global.yaml configuration based on environment variables.
The PostgreSQL database is automatically backed up using Ofelia. Backups are stored in the db_data volume.
- Database Connection Issues: Ensure the PostgreSQL service is healthy and the credentials in
.envare correct. - Configuration Sync Issues: Verify the deploy key and Git repository URL.
- Alerting Issues: Check the Pushover configuration in
.env.