Monitor Your Services with Gatus + Docker (Alternative to Uptime Kuma)
Smit Vaghasiya

Smit Vaghasiya @smit-vaghasiya

About: DevOps Engineer passionate about CI/CD, automation, and cloud solutions. Skilled in Docker, Kubernetes, Terraform, and AWS. Active in tech communities, mentoring, and fostering collaboration.

Location:
India
Joined:
Nov 9, 2023

Monitor Your Services with Gatus + Docker (Alternative to Uptime Kuma)

Publish Date: Apr 11
2 0

Gatus is a lightweight, open-source uptime monitoring tool that checks your endpoints, evaluates conditions, and sends alerts (Slack, Discord, etc.). Perfect for DevOps and developers who want a simple yet powerful monitoring solution.

Workflow

Prerequisites

  • Docker & Docker Compose installed
  • A Slack webhook URL (for alerts) – Get it here

Step 1: Setup Directory Structure
Create a folder named gatus with subfolders for configs and data:

mkdir -p gatus
cd gatus/
mkdir config data
Enter fullscreen mode Exit fullscreen mode

Your structure should look like this:

gatus/  
├── docker-compose.yml  
├── config/  
│   └── config.yaml  # Monitoring rules & alerts  
└── data/            # Database storage  
Enter fullscreen mode Exit fullscreen mode

Step 2: Configure docker-compose.yml
Paste this into gatus/docker-compose.yml:

services:
  gatus:
    image: twinproduction/gatus:latest
    ports:
      - "7777:8080"
    volumes:
      - ./config:/config
      - ./data:/data/
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      - TZ=Asia/Kolkata
Enter fullscreen mode Exit fullscreen mode

Step 3: Configure config.yaml
Edit gatus/config/config.yaml (example below checks a website and alerts via Slack):

alerting:
  slack:
    webhook-url: "https://hooks.slack.com/services/................."
    default-alert:
      failure-threshold: 3
      send-on-resolved: true
      send-on-recovery: true

security:
  basic:
    username: "gatus"
    password-bcrypt-base64: "JDJ5JDA5JDdDb1k5UC5LMGRBdGszTTA0SHE1ZGVRdkFnTzgxTUNkemVQbXI1SjQ3eTVrNVc1Mi80ZS5L"

storage:
  type: sqlite
  path: /data/data.db


endpoints:
  - name: Buyer Panel Failed
    group: AWS
    url: "https://domain-name.com"
    interval: 30s
    conditions:
      - "[STATUS] == 200"
      - "[RESPONSE_TIME] < 1000"
    alerts:
      - type: slack
        description: "Buyer Panel in AWS is failed."

  - name: Vendor Panel Failed
    group: Google
    url: "https://domain-name.com/"
    interval: 30s
    conditions:
      - "[STATUS] == 200"
      - "[CERTIFICATE_EXPIRATION] > 48h"
      - "[RESPONSE_TIME] < 1000"
    alerts:
      - type: slack
        description: "Vendor Panel in Google is failed"
Enter fullscreen mode Exit fullscreen mode

🔐 Generate Secure Credentials

  • Hash a password with bcrypt.online (e.g., mypassword → $2a$...). - Link
  • Encode the hash in Base64 (for YAML safety). - Link

Step 4: Launch Gatus
Run:

cd gatus && docker-compose up -d
Enter fullscreen mode Exit fullscreen mode

Access the dashboard at:
👉 http://localhost:7777

Login

Gatus Dashboard

Slack Alert Output

Why Gatus?
✅ Lightweight, easy Docker setup
✅ Condition-based monitoring (status codes, response time)
✅ Slack/Discord/PagerDuty alerts
✅ Built-in authentication

GitHub Repo: Link

💬 Need help? Drop a comment! If you’ve used Uptime Kuma before, how does Gatus compare for your needs?

Comments 0 total

    Add comment