Module: check_mk
Branch: master
Commit: 3372d088e876a5a3c9427d4b09f1da4f64c3efb1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3372d088e876a5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 3 18:31:37 2014 +0100
#1570 FIX Fix notification of check_http active checks with Nagios core
When using Nagios as the core and a check command that contains single
quotes then the notification would not work. This is because the variables
are enclosed in single quotes in <tt>check_mk_templates.cfg</tt>. That file
has been changed so that for the check command macros double quotes are
being used. Check_MK itself does never use double quotes in its strings
so this is less likely to cause problems.
The Check_MK Micro Core does not have this problem. Everything works
fine here.
---
.werks/1570 | 17 +++++++++++++++++
ChangeLog | 1 +
check_mk_templates.cfg | 4 ++--
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/.werks/1570 b/.werks/1570
new file mode 100644
index 0000000..85618f4
--- /dev/null
+++ b/.werks/1570
@@ -0,0 +1,17 @@
+Title: Fix notification of check_http active checks with Nagios core
+Level: 1
+Component: notifications
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417627787
+Class: fix
+
+When using Nagios as the core and a check command that contains single
+quotes then the notification would not work. This is because the variables
+are enclosed in single quotes in <tt>check_mk_templates.cfg</tt>. That file
+has been changed so that for the check command macros double quotes are
+being used. Check_MK itself does never use double quotes in its strings
+so this is less likely to cause problems.
+
+The Check_MK Micro Core does not have this problem. Everything works
+fine here.
diff --git a/ChangeLog b/ChangeLog
index c69126e..c546fba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -152,6 +152,7 @@
* 1582 FIX: Fixed missing graphs in mails when sending notifications to
non-contacts...
* 1583 FIX: Can use contact groups without hosts/services assigned in RBN rules
now...
* 1606 FIX: Moved notify.log to var/log/notify.log in OMD environments...
+ * 1570 FIX: Fix notification of check_http active checks with Nagios core...
BI:
* 1435 FIX: Saving BI aggregations: No longer reports 'Request-URI Too
Large'...
diff --git a/check_mk_templates.cfg b/check_mk_templates.cfg
index 47bc763..77029b5 100644
--- a/check_mk_templates.cfg
+++ b/check_mk_templates.cfg
@@ -371,7 +371,7 @@ define command {
NOTIFY_LASTHOSTUP='$LASTHOSTUP$' \
NOTIFY_HOSTSTATE='$HOSTSTATE$' \
NOTIFY_HOSTSTATEID='$HOSTSTATEID$' \
- NOTIFY_HOSTCHECKCOMMAND='$HOSTCHECKCOMMAND$' \
+ NOTIFY_HOSTCHECKCOMMAND="$HOSTCHECKCOMMAND$" \
NOTIFY_HOSTOUTPUT='$HOSTOUTPUT$' \
NOTIFY_HOSTPERFDATA='$HOSTPERFDATA$' \
NOTIFY_LONGHOSTOUTPUT='$LONGHOSTOUTPUT$' \
@@ -386,7 +386,7 @@ define command {
NOTIFY_SERVICEOUTPUT='$SERVICEOUTPUT$' \
NOTIFY_LONGSERVICEOUTPUT='$LONGSERVICEOUTPUT$' \
NOTIFY_SERVICEPERFDATA='$SERVICEPERFDATA$' \
- NOTIFY_SERVICECHECKCOMMAND='$SERVICECHECKCOMMAND$' \
+ NOTIFY_SERVICECHECKCOMMAND="$SERVICECHECKCOMMAND$" \
NOTIFY_DATE='$DATE$' \
NOTIFY_SHORTDATETIME='$SHORTDATETIME$' \
NOTIFY_LONGDATETIME='$LONGDATETIME$' \