Add healthcheck pings to opentofu and add systemd cleanup to healthcheck
This commit is contained in:
parent
2ad3cce749
commit
a15e70d73d
7 changed files with 60 additions and 11 deletions
roles/healthcheck/files/data
|
@ -2,7 +2,6 @@
|
|||
|
||||
cd /opt/ || exit
|
||||
|
||||
hc_url="https://hc-ping.com/$HTTP_HC_UID"
|
||||
services_down=""
|
||||
error=""
|
||||
|
||||
|
@ -46,8 +45,8 @@ check_url "www.reitanlage-oranienburg.de"
|
|||
|
||||
if [ "$error" = "" ]
|
||||
then
|
||||
curl_hc "$hc_url" >/dev/null
|
||||
curl_hc "$HTTP_HC_URL" >/dev/null
|
||||
echo "ALL GOOD"
|
||||
else
|
||||
curl_hc --data-raw "$services_down$error" "$hc_url/fail" >/dev/null
|
||||
curl_hc --data-raw "$services_down$error" "$HTTP_HC_URL/fail" >/dev/null
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue