Module: check_mk
Branch: master
Commit: bbf9c97f4d2dd43df417fe9bbf6ac9306231146a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbf9c97f4d2dd4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 25 13:55:15 2016 +0100
4071 FIX Removed notes_url from "LOG *" logwatch services
In previous versions of Check_MK we created hard coded "notes URLs" for all services.
This was done to make the logwatch pages automatically linked from 3rd party GUIs
like the good old Nagios CGIs. These days we do not recommend nor support such GUIs,
so we decided to drop this pre-created notes url definition.
The "advantage" is now that you can now create a custom notes URL for these services.
---
.werks/4071 | 14 ++++++++++++++
ChangeLog | 1 +
modules/check_mk.py | 5 -----
modules/nagios.py | 10 ++--------
web/plugins/icons/builtin.py | 3 ---
5 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/.werks/4071 b/.werks/4071
new file mode 100644
index 0000000..371e687
--- /dev/null
+++ b/.werks/4071
@@ -0,0 +1,14 @@
+Title: Removed notes_url from "LOG *" logwatch services
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.4.0i3
+Date: 1480078379
+Class: fix
+
+In previous versions of Check_MK we created hard coded "notes URLs" for all services.
+This was done to make the logwatch pages automatically linked from 3rd party GUIs
+like the good old Nagios CGIs. These days we do not recommend nor support such GUIs,
+so we decided to drop this pre-created notes url definition.
+
+The "advantage" is now that you can now create a custom notes URL for these services.
diff --git a/ChangeLog b/ChangeLog
index e9f625b..0df8445 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,7 @@
* 3938 FIX: tactical overview: fixed wrong display of number of host/service problems...
* 3980 FIX: Fixed possible flickering GUI when using Chrome and zooming the page
* 3981 FIX: Views: Fixed context button displaying depending on usage
+ * 4071 FIX: Removed notes_url from "LOG *" logwatch services...
WATO:
* 3984 Permissions can now be filtered by providing a search term on the "edit role" page...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index ed2ba6a..173df00 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -2994,11 +2994,6 @@ def replace_macros(s, macros):
return s
-def logwatch_notes_url(hostname, filename):
- return "/%s/nagios/logwatch.php?host=%s&file=%s" % \
- (omd_site(), urllib.quote(hostname), urllib.quote(make_utf8(filename)))
-
-
#.
# .--Main Functions------------------------------------------------------.
# | __ __ _ _____ _ _ |
diff --git a/modules/nagios.py b/modules/nagios.py
index 6afab0b..1effcc0 100644
--- a/modules/nagios.py
+++ b/modules/nagios.py
@@ -296,12 +296,6 @@ define servicedependency {
else:
template = passive_service_template
- # Hardcoded for logwatch check: Link to logwatch.php
- if checkname == "logwatch":
- logwatch = " notes_url\t\t\t" + (logwatch_notes_url(hostname, item)) + "\n"
- else:
- logwatch = "";
-
# Services Dependencies
for dep in deps:
outfile.write("define servicedependency {\n"
@@ -345,10 +339,10 @@ define servicedependency {
host_name\t\t\t%s
service_description\t\t%s
check_interval\t\t%d
-%s%s%s check_command\t\t\tcheck_mk-%s
+%s%s check_command\t\t\tcheck_mk-%s
}
-""" % ( template, hostname, description.encode("utf-8"), check_interval, logwatch,
+""" % ( template, hostname, description.encode("utf-8"), check_interval,
extra_service_conf_of(hostname, description), action_cfg, checkname ))
checknames_to_define.add(checkname)
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index 284f02e..42e2b30 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -492,9 +492,6 @@ def paint_notes(what, row, tags, host_custom_vars):
if display_options.enabled(display_options.X):
notes_url = row[what + "_notes_url_expanded"]
check_command = row[what + "_check_command"]
- if check_command == 'check_mk-logwatch' and \
- "check_mk/logwatch.py?host" in notes_url:
- return # Ancient logwatch URL via notes_url. Ignore in order to avoid duplicate icon
if notes_url:
return 'notes', _('Custom Notes'), notes_url