You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: check_mk_telegram-notify.sh
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
#!/bin/bash
2
-
# Push Notification with Emojis (using Telegram)
2
+
# Push Notification (using Telegram)
3
3
#
4
4
# Script Name : check_mk_telegram-notify.sh
5
5
# Description : Send Check_MK notifications by Telegram
@@ -59,29 +59,30 @@ else
59
59
fi
60
60
61
61
# Set an appropriate emoji for the current state
62
+
# Feel free to change the emoji to your own taste. This is done by customizing the UTF8 code. Examples here: https://apps.timwhitlock.info/emoji/tables/unicode
62
63
if [[ ${NOTIFY_WHAT}=="SERVICE" ]];then
63
64
STATE="${NOTIFY_SERVICESHORTSTATE}"
64
65
else
65
66
STATE="${NOTIFY_HOSTSHORTSTATE}"
66
67
fi
67
68
case"${STATE}"in
68
69
OK|UP)
69
-
EMOJI="✅ "
70
+
EMOJI=$'\xE2\x9C\x85'# white heavy check mark
70
71
;;
71
72
WARN)
72
-
EMOJI="⚠ "
73
+
EMOJI=$'\xE2\x9A\xA0'# warning sign
73
74
;;
74
75
CRIT|DOWN)
75
-
EMOJI="🔥 "
76
+
EMOJI=$'\xF0\x9F\x86\x98'# squared sos
76
77
;;
77
78
UNKN)
78
-
EMOJI="❓ "
79
+
EMOJI=$'\xF0\x9F\x94\x84'# anticlockwise downwards and upwards open circle arrows
79
80
;;
80
81
esac
81
82
82
83
# Create a MESSAGE variable to send to your Telegram bot
0 commit comments