Module: check_mk
Branch: master
Commit: 33daf33821de7133ef9f7a126634c2136fe9a9c2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=33daf33821de71…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Fri Dec 23 15:20:57 2016 +0100
Improved help text for monitoring macros
Change-Id: Ibf76670a7185ee71d1c73a93781d14eec94fbed1
---
web/htdocs/wato.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4a3c3d2..22ba2bd 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -16500,15 +16500,15 @@ def monitoring_macro_help():
"<ul>"
"<li><tt>$HOSTADDRESS$</tt>: The IP address of the host</li>"
"<li><tt>$HOSTNAME$</tt>: The name of the host</li>"
- "<li><tt>$USER1$</tt>: user macro 1 (usually path to shipped plugins)</li>"
- "<li><tt>$USER2$</tt>: user marco 2 (usually path to your own plugins)</li>"
"<li><tt>$_HOSTTAGS$</tt>: List of host tags</li>"
"<li><tt>$_HOSTADDRESS_4$</tt>: The IPv4 address of the host</li>"
"<li><tt>$_HOSTADDRESS_6$</tt>: The IPv6 address of the host</li>"
"<li><tt>$_HOSTADDRESS_FAMILY$</tt>: The primary address family of the host</li>"
"</ul>"
- "All custom variables defined for the host are available as <tt>$_HOST[VARNAME]$</tt>. "
- "Replace <tt>[VARNAME]</tt> with the <i>upper case</i> name of your variable.")
+ "All custom attributes defined for the host are available as <tt>$_HOST[VARNAME]$</tt>. "
+ "Replace <tt>[VARNAME]</tt> with the <i>upper case</i> name of your variable. "
+ "For example, a host attribute named <tt>foo</tt> with the value <tt>bar</tt> would result in "
+ "the macro <tt>$_HOSTFOO$</tt> being replaced with <tt>bar</tt> ")
#.
Module: check_mk
Branch: master
Commit: af1cb0f2b0a9e825522e856acb6bb2d1970994df
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=af1cb0f2b0a9e8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 23 14:53:10 2016 +0100
4223 FIX Fixed possible g_host_attribute related AttributeError exception
Change-Id: Id1c2d3b7003e2287f6020adafaf2d86792a25a63
---
.werks/4223 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 20 +++++++++++---------
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/.werks/4223 b/.werks/4223
new file mode 100644
index 0000000..fd6b9b4
--- /dev/null
+++ b/.werks/4223
@@ -0,0 +1,9 @@
+Title: Fixed possible g_host_attribute related AttributeError exception
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.4.0i4
+Date: 1482501180
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 03819ee..2d77605 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,7 @@
* 4218 FIX: Disabling replication with a site did not clear the changes for this site (1.4.0i3 regression)
* 4221 FIX: Fixed "analyse parameters" page for services with umlauts in names
* 4222 FIX: Services of host page: Fixed encoding issue for hosts with umlauts in alias
+ * 4223 FIX: Fixed possible g_host_attribute related AttributeError exception
Notifications:
* 4197 FIX: Fix sending notification to global fallback email address
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index cc67dcb..6b88730 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -68,6 +68,17 @@ automation_commands = {}
g_rulespecs = None
g_rulegroups = {}
+# Global datastructure holding all attributes (in a defined order)
+# as pairs of (attr, topic). Topic is the title under which the
+# attribute is being displayed. All builtin attributes use the
+# topic None. As long as only one topic is used, no topics will
+# be displayed. They are useful if you have a great number of
+# custom attributes.
+g_host_attributes = []
+
+# Dictionary for quick access
+g_host_attribute = {}
+
def initialize_before_loading_plugins():
if g_rulespecs:
g_rulespecs.clear()
@@ -2951,16 +2962,7 @@ class ContactGroupsAttribute(Attribute):
def initialize_host_attribute_structures():
global g_host_attributes, g_host_attribute
-
- # Global datastructure holding all attributes (in a defined order)
- # as pairs of (attr, topic). Topic is the title under which the
- # attribute is being displayed. All builtin attributes use the
- # topic None. As long as only one topic is used, no topics will
- # be displayed. They are useful if you have a great number of
- # custom attributes.
g_host_attributes = []
-
- # Dictionary for quick access
g_host_attribute = {}