Skip to content

Commit

Permalink
feat: gatus
Browse files Browse the repository at this point in the history
  • Loading branch information
auricom committed May 21, 2024
1 parent a6d4cae commit a11f768
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Containerfile.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ COPY .sops.yaml /usr/share/sops/
COPY apps/blocky/blocky.container /usr/share/containers/systemd/
COPY apps/blocky/config/config.yaml /usr/etc/blocky/

# Apps - Gatus
COPY apps/gatus/gatus.container /usr/share/containers/systemd/
COPY apps/gatus/config.sops.env /usr/share/gatus/config.sops.env
COPY apps/gatus/config /usr/etc/gatus/

# Apps - Node-exporter
COPY apps/node-exporter/node-exporter.container /usr/share/containers/systemd/

Expand Down
9 changes: 9 additions & 0 deletions apps/gatus/config.sops.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PUSHOVER_TOKEN=ENC[AES256_GCM,data:tQJttgp5HUpdI5kO2h/n5DJpq5y1C0YoNTTin09I,iv:lRSUczT0Y8DlkHr0uwRD3AwrnFlIEsPNtSBFe5sLXCA=,tag:Jz66IflvyGzYsGOY0tgDSA==,type:str]
PUSHOVER_USER_KEY=ENC[AES256_GCM,data:2NCj1OMsoJ/0pBQEfDbp2lI79BTxY9t3G6cQxUDX,iv:XhrVi1n8XukRGavLlT4OZAVHMU/X7ui526iawLhlZSw=,tag:TMQD4BUnzTlstXiE6E3Iqg==,type:str]
HEARTBEAT_URL=ENC[AES256_GCM,data:t/hIjG55phk6Z58suA96RWQpnwF2OzSj2EzkSy7uYy04QKoaOFBT55m73cYF2uUBVf1hlJWxpSA=,iv:1HFg+/z+ZWWaBlCeVVsU1z3n1R02YaUmtYAzMiHnDYc=,tag:eR/LlCr3lZcjSkd/MjaAJw==,type:str]
sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3M0pTSVlLdnVGQ2xienZL\ncmNSamVhU1RWUUZjcVArOG5CdUlueldwclQ0CmJtUkQ4QmVGUGQ4b1FOK01sTWJr\nUkNYbXRGcFJwOFJncGlFdkUyNUs4VE0KLS0tIGlSNTUwMTFyeTFYbFhxNlU5NTZ3\naGdSMjl1VVFSYndRV2ZTZkFOT25YRUkKpKGiSSBEEzqjr9w+P+CdekgxVTl4jCff\n+iRNJhBCiWbS7Oojt2QkAEELzwEgGSy2ohYqak540Q8/EQHQ9sJQhA==\n-----END AGE ENCRYPTED FILE-----\n
sops_age__list_0__map_recipient=age1c8cqpw6gnlrf82ewm2vj0yalzszvtzd0mmk5yzr4nfpqqseynq7q86f3sq
sops_lastmodified=2024-05-21T22:25:02Z
sops_mac=ENC[AES256_GCM,data:5GzOffWKVOOffy+8FhFK8214YdNThfvD9/nspYCsurffCF39zK4U/xlF2Q8klq99xvpUUEjCLc9fK0a7l+M0lE4oIBld1XqahdVgAMF36DZWDPfUdD9DIKhjlMEnemO1Fp5gOXUqVxKAJ8hmFKzSZt8AK1kkfPuNSA5hu+C2xUs=,iv:AxCt+tbTN4w7b0OSYQjp28LYD4VWmvZdFld8zsnoJec=,tag:QaSuBO/VbYYqmCuANV8zsw==,type:str]
sops_unencrypted_suffix=_unencrypted
sops_version=3.8.1
30 changes: 30 additions & 0 deletions apps/gatus/config/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
web:
port: 8080
storage:
type: memory
metrics: true
ui:
title: Status | Gatus
header: Status
alerting:
pushover:
title: Gatus (Service)
application-token: ${PUSHOVER_TOKEN}
user-key: ${PUSHOVER_USER_KEY}
priority: 1
default-alert:
description: health-check failed
send-on-resolved: true
failure-threshold: 3
success-threshold: 3
connectivity:
checker:
target: 1.1.1.1:53
interval: 1m
endpoints:
- name: Heartbeat
group: Gatus
url: ${HEARTBEAT_URL}
interval: 5m
conditions: ["[STATUS] == 200"]
56 changes: 56 additions & 0 deletions apps/gatus/config/group-icmp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
endpoints:
- name: OPNsense
group: ICMP
url: icmp://192.168.8.1
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: Unifi SW8
group: ICMP
url: icmp://192.168.8.10
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: Unifi AP AC Pro
group: ICMP
url: icmp://192.168.8.20
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: PiKVM
group: ICMP
url: icmp://192.168.8.200
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: storage
group: ICMP
url: icmp://192.168.9.10
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: philips-hue
group: ICMP
url: icmp://192.168.9.90
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: talos-node-1
group: ICMP
url: icmp://192.168.9.101
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: talos-node-2
group: ICMP
url: icmp://192.168.9.102
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: talos-node-3
group: ICMP
url: icmp://192.168.9.103
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: talos-node-4
group: ICMP
url: icmp://192.168.9.104
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
- name: cam-01-bedroom
group: ICMP
url: icmp://192.168.12.20
conditions: ["[CONNECTED] == true"]
alerts: [{ type: pushover }]
30 changes: 30 additions & 0 deletions apps/gatus/gatus.container
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[Unit]
Description=gatus
After=network-online.target
Wants=network-online.target

[Service]
Restart=always
RestartSec=3
TimeoutStartSec=900
Environment=SOPS_AGE_KEY_FILE=/root/.config/sops/age/keys.txt
ExecStartPre=/bin/sh -c 'test -f "${SOPS_AGE_KEY_FILE}" || exit 1'
ExecStartPre=/usr/bin/sops --config /usr/share/sops/.sops.yaml exec-file /usr/share/gatus/config.sops.env "cp {} /etc/gatus/config.env ; chmod 400 /etc/gatus/config.env"

[Container]
AddCapability=NET_BIND_SERVICE
AddCapability=NET_RAW
ContainerName=gatus
Environment=GATUS_CONFIG_PATH=/config
Environment=TZ=Europe/Paris
EnvironmentFile=/etc/gatus/config.env
Image=ghcr.io/twin/gatus:v5.10.0@sha256:658a9cb993ff0b16832947dab8de885b2e2a66037330b839310fa3f39d5c00f4
Volume=/etc/gatus:/config:ro
# Traefik
Label=traefik.enable="true"
Label=traefik.http.routers.gatus.entrypoints="websecure"
Label=traefik.http.routers.gatus.rule=Host'(`status.feisar.ovh`)'
Label=traefik.http.services.gatus.loadbalancer.server.port="8080"

[Install]
WantedBy=multi-user.target default.target

0 comments on commit a11f768

Please sign in to comment.