Skip to content

Instantly share code, notes, and snippets.

@craftslab
Last active February 3, 2024 08:07
Show Gist options
  • Save craftslab/4efc632d402e4b669b47011e240a84d8 to your computer and use it in GitHub Desktop.
Save craftslab/4efc632d402e4b669b47011e240a84d8 to your computer and use it in GitHub Desktop.
gatus deploy
metrics: false
debug: false
web:
port: 8080
ui:
header: example
logo: ""
link: https://example.org
buttons:
- name: "example"
link: "https://example.org"
storage:
type: sqlite
path: /data/data.db
alerting:
email:
from: "from@example.com"
username: "from@example.com"
password: "hunter2"
host: "mail.example.com"
port: 587
to: "recipient1@example.com,recipient2@example.com"
client:
insecure: false
endpoints:
- name: check-url
group: core
url: "https://example.org/"
interval: 5m
conditions:
- "[STATUS] == 200"
- "[CERTIFICATE_EXPIRATION] > 48h"
- "[BODY].status == UP"
- "[RESPONSE_TIME] < 1000"
- name: check-dns
url: "8.8.8.8"
interval: 5m
dns:
query-name: "example.com"
query-type: "A"
conditions:
- "[BODY] == 93.184.216.34"
- "[DNS_RCODE] == NOERROR"
- name: check-tcp
url: "tcp://127.0.0.1:6379"
interval: 30s
conditions:
- "[CONNECTED] == true"
- name: check-wss
url: "wss://example.com/"
body: "status"
conditions:
- "[CONNECTED] == true"
- "[BODY].result >= 0"
- name: check-ssh
url: "ssh://example.com:22"
ssh:
username: "username"
password: "password"
body: |
{
"command": "uptime"
}
interval: 1m
conditions:
- "[CONNECTED] == true"
- "[STATUS] == 0"
- name: check-domain-and-certificate-expiration
url: "https://example.org"
interval: 1h
conditions:
- "[DOMAIN_EXPIRATION] > 720h"
- "[CERTIFICATE_EXPIRATION] > 240h"
- name: check-api-healthy
group: backend
url: "https://twin.sh/health"
interval: 5m
conditions:
- "[STATUS] == 200"
- "[BODY].status == UP"
- "[RESPONSE_TIME] < 1000"
- name: check-domain-expiration
url: "https://example.org"
interval: 6h
conditions:
- "[DOMAIN_EXPIRATION] > 720h"
- name: check-html-rendering-works
group: frontend
url: "https://example.org"
interval: 5m
conditions:
- "[STATUS] == 200"
- "[BODY] == pat(*<h1>Example Domain</h1>*)"
version: "3.8"
services:
gatus:
image: twinproduction/gatus:latest
ports:
- 8080:8080
volumes:
- ./config:/config
- ./data:/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment