Gatus 是一個使用 Go 的開源網站監控套件, 讀入 yaml 的 config 檔案,在檔案中定義要輪詢的 endpoints 以及輪詢的各項設定, 並且可以串接 email, slack 等通知。
- docker installed
- docker-compose installed
- yarn installed
recommended OS: Linux and macOS
- build demo server docker image
docker build -t gatus_demo:latest .
- init project
yarn gatus:init
- start demo
yarn run gatus:up
- end demo
yarn run gatus:down
使用 gmail 為例
- 申請 gmail app password
- 更改 config.yaml 的 alerting.email
alerting:
email:
from: "[email protected]"
to: "[email protected],[email protected]"
password: "<your_gmail_app_password>"
port: 587
host: "smtp.gmail.com"
- 在 endpoint 加上 alerts
endpoints:
- name: let me see see
url: https://rang.wo.kan.kan
conditions:
- "[STATUS] == 200"
alerts:
- type: email
enabled: true
description: cannot see
send-on-resolved: true