X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fmonitoring%2Fplugins%2Fnotify_eban_url;fp=modules%2Fprivate%2Fmonitoring%2Fplugins%2Fnotify_eban_url;h=107b5dedc67e67566ba0a2392edbc7ec68389fff;hp=431e32010a7ff1ae6ad4f4f456e4ff671f3b6dfe;hb=c41d0de83b1841097c6be8d8baeed557b065657b;hpb=ef909e2435194af725f4338a13e4732328ef7361 diff --git a/modules/private/monitoring/plugins/notify_eban_url b/modules/private/monitoring/plugins/notify_eban_url index 431e320..107b5de 100755 --- a/modules/private/monitoring/plugins/notify_eban_url +++ b/modules/private/monitoring/plugins/notify_eban_url @@ -1,13 +1,6 @@ #!/usr/bin/env bash -PASS=$(echo "$PASSWORD" | base64 -d) - if [ "$SERVICESTATE" = "CRITICAL" -o "$SERVICESTATE" = "UNKNOWN" -o "$HOSTSTATE" = "DOWN" -o "$HOSTSTATE" = "UNREACHABLE" ]; then - action=downAlert -elif [ "$SERVICESTATE" = "OK" -o "$HOSTSTATE" = "UP" ]; then - action=upAlert -fi - -if [ -n "$action" ]; then - curl -X GET -G --data-urlencode "service=$STATUS_NAME" --data-urlencode "mdp=$PASS" https://infra.eban.bzh/$action + MESSAGE="$STATUS_NAME seems down!" + curl -X GET -G --data-urlencode "user=$USER" --data-urlencode "pass=$PASSWORD" --data-urlencode "msg=$MESSAGE" https://smsapi.free-mobile.fr/sendmsg fi