From 9f0e71f8a0b5a0833cfbc8b5c644641b6c71520d Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Sun, 30 Oct 2022 01:53:58 +0200 Subject: [PATCH] Use healthcheck endpoint to monitor OsteoView --- profiles/backend.nix | 8 +++++++- profiles/storage.nix | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/profiles/backend.nix b/profiles/backend.nix index d10130a..e049a3a 100644 --- a/profiles/backend.nix +++ b/profiles/backend.nix @@ -59,7 +59,13 @@ then alert check host osteoview with address osteoview.app - if failed port 443 protocol https with timeout 5 seconds then alert + if failed + port 443 + protocol https + status = 200 + request "/api/_health" + with timeout 5 seconds + then alert ''; }; diff --git a/profiles/storage.nix b/profiles/storage.nix index 3926374..b0204b4 100644 --- a/profiles/storage.nix +++ b/profiles/storage.nix @@ -61,7 +61,13 @@ if status != 0 then alert check host osteoview with address osteoview.app - if failed port 443 protocol https with timeout 5 seconds then alert + if failed + port 443 + protocol https + status = 200 + request "/api/_health" + with timeout 5 seconds + then alert ''; };