aboutsummaryrefslogtreecommitdiff
path: root/modules/private/monitoring/plugins
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2021-03-28 18:38:04 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2021-03-28 18:38:04 +0200
commitc41d0de83b1841097c6be8d8baeed557b065657b (patch)
tree3b188758640fcb97ba0927948d4bbc0b9f04c579 /modules/private/monitoring/plugins
parentef909e2435194af725f4338a13e4732328ef7361 (diff)
downloadNix-c41d0de83b1841097c6be8d8baeed557b065657b.tar.gz
Nix-c41d0de83b1841097c6be8d8baeed557b065657b.tar.zst
Nix-c41d0de83b1841097c6be8d8baeed557b065657b.zip
Adjustments for monitoring
Diffstat (limited to 'modules/private/monitoring/plugins')
-rwxr-xr-xmodules/private/monitoring/plugins/notify_eban_url11
1 files changed, 2 insertions, 9 deletions
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 @@
1#!/usr/bin/env bash 1#!/usr/bin/env bash
2 2
3PASS=$(echo "$PASSWORD" | base64 -d)
4
5if [ "$SERVICESTATE" = "CRITICAL" -o "$SERVICESTATE" = "UNKNOWN" -o "$HOSTSTATE" = "DOWN" -o "$HOSTSTATE" = "UNREACHABLE" ]; then 3if [ "$SERVICESTATE" = "CRITICAL" -o "$SERVICESTATE" = "UNKNOWN" -o "$HOSTSTATE" = "DOWN" -o "$HOSTSTATE" = "UNREACHABLE" ]; then
6 action=downAlert 4 MESSAGE="$STATUS_NAME seems down!"
7elif [ "$SERVICESTATE" = "OK" -o "$HOSTSTATE" = "UP" ]; then 5 curl -X GET -G --data-urlencode "user=$USER" --data-urlencode "pass=$PASSWORD" --data-urlencode "msg=$MESSAGE" https://smsapi.free-mobile.fr/sendmsg
8 action=upAlert
9fi
10
11if [ -n "$action" ]; then
12 curl -X GET -G --data-urlencode "service=$STATUS_NAME" --data-urlencode "mdp=$PASS" https://infra.eban.bzh/$action
13fi 6fi