From 79eeb2a4912d681fc751c13848661e8e63990ea3 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Sat, 11 Apr 2026 15:19:03 +0700 Subject: [PATCH] machines/sirius: add monitoring system --- machines/sirius/configuration.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/machines/sirius/configuration.nix b/machines/sirius/configuration.nix index 0f84855..41637bb 100644 --- a/machines/sirius/configuration.nix +++ b/machines/sirius/configuration.nix @@ -1,5 +1,6 @@ { self, + pkgs, ... }: { @@ -70,4 +71,22 @@ ]; }; + systemd.services.heartbeat-push = { + description = "Heartbeat push to uptime monitor"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.curl}/bin/curl -s -o /dev/null https://uptime.b4l.co.th/api/push/X0WCHAcY5gPf1U8If7BT1FLjpacZqGZu?status=up&msg=OK&ping="; + }; + }; + + systemd.timers.heartbeat-push = { + description = "Heartbeat push timer"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "60s"; + OnUnitActiveSec = "60s"; + Unit = "heartbeat-push.service"; + }; + }; + }