Module: check_mk
Branch: master
Commit: 985613e33c60c598ef7d6e818d1c0f8a27daf32a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=985613e33c60c5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 18 10:12:54 2013 +0100
FIX: Re-added an empty file as auth.py (wato plugin) to prevent problems during update
---
ChangeLog | 1 +
modules/notify.py | 11 ++++++++++-
web/plugins/wato/auth.py | 4 ++++
3 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4f92314..938a009 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,7 @@
* LDAP: Improved error handling in case of misconfigurations
* LDAP: Reduced number of ldap querys during a single page request / sync process
* LDAP: Implemnted some kind of debug logging for LDAP communication
+ * FIX: Re-added an empty file as auth.py (wato plugin) to prevent problems during
update
WATO:
* CPU load ruleset does now accept float values
diff --git a/modules/notify.py b/modules/notify.py
index 989d3bb..5ca0b87 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -100,6 +100,9 @@ test_vars = {
'NOTIFY_SERVICEPROBLEMID': '$SERVICEPROBLEMID$',
'NOTIFY_SERVICESTATE': '$SERVICESTATE$',
'NOTIFY_SHORTDATETIME': '2013-01-17 15:28:13',
+ 'NOTIFY_WHAT': 'HOST',
+ 'NOTIFY_OMD_ROOT': '/omd/sites/event',
+ 'NOTIFY_OMD_SITE': 'event',
},
'service': {
'NOTIFY_CONTACTEMAIL': 'lm(a)mathias-kettner.de'.de',
@@ -133,6 +136,9 @@ test_vars = {
'NOTIFY_SERVICEPROBLEMID': '137',
'NOTIFY_SERVICESTATE': 'CRITICAL',
'NOTIFY_SHORTDATETIME': '2013-01-17 15:31:46',
+ 'NOTIFY_WHAT': 'SERVICE',
+ 'NOTIFY_OMD_ROOT': '/omd/sites/event',
+ 'NOTIFY_OMD_SITE': 'event',
},
}
@@ -367,7 +373,10 @@ def call_notification_script(plugin, parameters, context):
for nr, value in enumerate(parameters):
os.putenv("NOTIFY_PARAMETER_%d" % (nr + 1), value)
os.putenv("NOTIFY_LOGDIR", notification_logdir)
- os.putenv("NOTIFY_WHAT", context['WHAT'])
+
+ for key in [ 'WHAT', 'OMD_ROOT', 'OMD_SITE' ]:
+ if key in context:
+ os.putenv('NOTIFY_' + key, context[key])
# Remove service macros for host notifications
if context['WHAT'] == 'HOST':
diff --git a/web/plugins/wato/auth.py b/web/plugins/wato/auth.py
new file mode 100644
index 0000000..3e12ec2
--- /dev/null
+++ b/web/plugins/wato/auth.py
@@ -0,0 +1,4 @@
+# The auth.php was shipped by default in previos versions. It has
+# been removed with 1.2.1i4. To prevent problems during update,
+# this dummy file is shipped which overwrites the existing file
+# and invalidates it. This can be removed in later versions.