aboutsummaryrefslogtreecommitdiff
path: root/modules/private/monitoring/plugins
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-12-29 22:06:59 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-12-29 22:06:59 +0100
commit2edbb2d889bd9d1787bc1745a75c1b6969d148ab (patch)
treea2784aad8833d4a1303e7bd90a2ec1587579ad7a /modules/private/monitoring/plugins
parentb4b5eadc29d2547e181ce60d735a4b943beb2a9a (diff)
downloadNix-2edbb2d889bd9d1787bc1745a75c1b6969d148ab.tar.gz
Nix-2edbb2d889bd9d1787bc1745a75c1b6969d148ab.tar.zst
Nix-2edbb2d889bd9d1787bc1745a75c1b6969d148ab.zip
Add Eban monitoring
Diffstat (limited to 'modules/private/monitoring/plugins')
-rwxr-xr-xmodules/private/monitoring/plugins/notify_eban_url13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/private/monitoring/plugins/notify_eban_url b/modules/private/monitoring/plugins/notify_eban_url
new file mode 100755
index 0000000..431e320
--- /dev/null
+++ b/modules/private/monitoring/plugins/notify_eban_url
@@ -0,0 +1,13 @@
1#!/usr/bin/env bash
2
3PASS=$(echo "$PASSWORD" | base64 -d)
4
5if [ "$SERVICESTATE" = "CRITICAL" -o "$SERVICESTATE" = "UNKNOWN" -o "$HOSTSTATE" = "DOWN" -o "$HOSTSTATE" = "UNREACHABLE" ]; then
6 action=downAlert
7elif [ "$SERVICESTATE" = "OK" -o "$HOSTSTATE" = "UP" ]; then
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