Module: check_mk
Branch: master
Commit: b05b8d093dc72228ace6bbc0bfb5d7557b4c0ff2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b05b8d093dc722…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Oct 27 15:40:41 2014 +0100
sms: fixed exception in script
---
notifications/sms | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/notifications/sms b/notifications/sms
index 89e2119..7e749a2 100755
--- a/notifications/sms
+++ b/notifications/sms
@@ -49,7 +49,7 @@ if not send_path and not spool_dir:
max_len = 160
message = os.environ['NOTIFY_HOSTNAME'] + " "
-notification_type = os.environ["NOTIFICATIONTYPE"]
+notification_type = os.environ["NOTIFY_NOTIFICATIONTYPE"]
# Prepare Default information and Type PROBLEM, RECOVERY
if os.environ['NOTIFY_WHAT'] == 'SERVICE':
@@ -76,12 +76,15 @@ if notification_type.startswith("FLAP"):
elif notification_type.startswith("DOWNTIME"):
what = notification_type[8:].title()
message += " Downtime " + what
+ message += " " + os.environ['NOTIFY_NOTIFICATIONCOMMENT']
elif notification_type == "ACKNOWLEDGEMENT":
message += " Acknowledged"
+ message += " " + os.environ['NOTIFY_NOTIFICATIONCOMMENT']
elif notification_type == "CUSTOM":
message += " Custom Notification"
+ message += " " + os.environ['NOTIFY_NOTIFICATIONCOMMENT']
recipient = os.environ['NOTIFY_CONTACTPAGER'].replace(" ",
"")