Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatus #34

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 153 additions & 0 deletions compose/gatus-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Open Issues:
# 1 Year Badge: https://github.com/TwiN/gatus/issues/714
# Order option for front page: https://github.com/TwiN/gatus/issues/35
# Ordering within a group: https://github.com/TwiN/gatus/issues/553

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

# Optional basic auth (OIDC is also supported)
security:
basic:
username: "seatable"
# Hashed with bcrypt, then base64 encoded
# hunter2
# You can generate the hash with the following command: htpasswd -bnBC 9 "" $PASSWORD | tr -d ':\n' | base64
# htpasswd is contained in the apache2-utils package
password-bcrypt-base64: "JDJhJDEwJHRiMnRFakxWazZLdXBzRERQazB1TE8vckRLY05Yb1hSdnoxWU0yQ1FaYXZRSW1McmladDYu"

ui:
header: "SeaTable Health Status (${SEATABLE_SERVER_HOSTNAME})"
logo: https://upload.wikimedia.org/wikipedia/commons/b/b7/Logo_word_seatable_vector_vector.svg

alerting:
email:
username: "${GATUS_EMAIL_USERNAME}"
password: "${GATUS_EMAIL_PASSWORD}"
host: "${GATUS_EMAIL_HOST}"
port: ${GATUS_EMAIL_PORT}
from: "${GATUS_EMAIL_FROM}"
# Allows multiple values separated by commas
to: "${GATUS_EMAIL_TO}"
default-alert:
enabled: true
description: "Health check failed"
send-on-resolved: true
failure-threshold: 1
success-threshold: 5

# Optional: Gatus won't send alerts during these periods
maintenance:
enabled: false
start: "16:40"
duration: 5m
timezone: "Europe/Berlin"

endpoints:
- name: SeaTable Login
group: SeaTable
url: https://${SEATABLE_SERVER_HOSTNAME}/
interval: 30s
conditions:
- "[STATUS] == 200"
alerts:
- type: email

- name: SeaTable (Authenticated API Access)
group: SeaTable
url: https://${SEATABLE_SERVER_HOSTNAME}/api2/auth/ping
headers:
Authorization: "Bearer ${GATUS_SEATABLE_ACCOUNT_TOKEN}"
interval: 30s
conditions:
- "[STATUS] == 200"
alerts:
- type: email

- name: SeaTable Web API
group: SeaTable
url: https://${SEATABLE_SERVER_HOSTNAME}/api2/ping/
interval: 30s
conditions:
- "[STATUS] == 200"
alerts:
- type: email

- name: SeaTable SQL
group: SeaTable
url: https://${SEATABLE_SERVER_HOSTNAME}/dtable-db/ping/
interval: 30s
conditions:
- "[STATUS] == 200"
alerts:
- type: email

- name: SeaTable Server
group: SeaTable
url: https://${SEATABLE_SERVER_HOSTNAME}/dtable-server/ping/
interval: 30s
conditions:
- "[STATUS] == 200"
alerts:
- type: email

- name: SeaTable API Gateway
group: SeaTable
url: https://${SEATABLE_SERVER_HOSTNAME}/api-gateway/api/v2/ping/
interval: 30s
conditions:
- "[STATUS] == 200"
alerts:
- type: email

- name: MariaDB
group: SeaTable
url: tcp://mariadb:3306
interval: 30s
conditions:
- "[CONNECTED] == true"
alerts:
- type: email

- name: Redis
group: SeaTable
url: tcp://redis:6379
interval: 30s
conditions:
- "[CONNECTED] == true"
alerts:
- type: email

- name: Certificate Expiration
group: SeaTable
url: "https://${SEATABLE_SERVER_HOSTNAME}"
interval: 24h
conditions:
- "[CERTIFICATE_EXPIRATION] > 240h"
alerts:
- type: email

- name: Python Pipeline
group: Additional Components
url: http://python-scheduler/ping/
interval: 30s
conditions:
- "[STATUS] == 200"
alerts:
- type: email

- name: Collabora
group: Additional Components
url: https://${SEATABLE_SERVER_HOSTNAME}:6232
interval: 30s
conditions:
- "[STATUS] == 200"
alerts:
- type: email

# Check internet connectivity
connectivity:
checker:
target: 1.1.1.1:53
interval: 60s
41 changes: 41 additions & 0 deletions compose/gatus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
services:
caddy:
ports:
- ${GATUS_PORT:-6220}:${GATUS_PORT:-6220}

seatable-server:
labels:
caddy.handle_path: /status
caddy.handle_path.0_redir: "https://${SEATABLE_SERVER_HOSTNAME}:${GATUS_PORT:-6220}"

gatus:
image: ${GATUS_IMAGE:-twinproduction/gatus:v5.13.1}
container_name: gatus
environment:
- SEATABLE_SERVER_HOSTNAME=${SEATABLE_SERVER_HOSTNAME:?Variable is not set or empty}
# Token for authenticated API access
- GATUS_SEATABLE_ACCOUNT_TOKEN=${GATUS_SEATABLE_ACCOUNT_TOKEN:?Variable is not set or empty}
- GATUS_EMAIL_USERNAME=${GATUS_EMAIL_USERNAME:?Variable is not set or empty}
- GATUS_EMAIL_PASSWORD=${GATUS_EMAIL_PASSWORD:?Variable is not set or empty}
- GATUS_EMAIL_HOST=${GATUS_EMAIL_HOST:?Variable is not set or empty}
- GATUS_EMAIL_PORT=${GATUS_EMAIL_PORT:?Variable is not set or empty}
- GATUS_EMAIL_FROM=${GATUS_EMAIL_FROM:?Variable is not set or empty}
# Allows multiple values (separated by commas)
- GATUS_EMAIL_TO=${GATUS_EMAIL_TO:?Variable is not set or empty}
volumes:
# Persist SQLite database
- /opt/gatus:/data
- ./gatus-config.yml:/config/config.yaml
labels:
caddy: "https://${SEATABLE_SERVER_HOSTNAME}:${GATUS_PORT:-6220}"
caddy.reverse_proxy: "{{upstreams 8080}}"
networks:
- frontend-net
- backend-seatable-net

networks:
frontend-net:
name: frontend-net
backend-seatable-net:
name: backend-seatable-net