fix auto acknowledge apt
This commit is contained in:
parent
2f6eaab905
commit
f277b2de1e
|
@ -47,6 +47,11 @@ while true; do
|
|||
if [ "$response" == "200" ] || [ "$response" == "409" ]; then
|
||||
# 409 is okay because that means it's already been acknowledged.
|
||||
echo "All pending alerts have been acknowledged."
|
||||
elif [ "$response" == "000" ]; then
|
||||
echo "ERROR: failed to reach Icinga2 server. Sleeping 60s..."
|
||||
sleep 60
|
||||
elif [ "$response" == "404" ]; then
|
||||
echo "Icinga reported no services to acknowledge."
|
||||
else
|
||||
echo "Failed to acknowledge the alerts. Status code: $response"
|
||||
if $EXIT_ON_FAILURE; then
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[Unit]
|
||||
Description=Auto Acknowledge all Icinga2 apt alerts
|
||||
Wants=icinga2.service icinga-director.service
|
||||
Requires=icinga2.service icinga-director.service
|
||||
|
||||
[Service]
|
||||
User=flask
|
||||
|
|
Loading…
Reference in New Issue