Module: check_mk
Branch: master
Commit: 7fb74461f62db455378ed2e47c85391361ce3194
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7fb74461f62db4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 27 13:21:05 2016 +0100
#2971 FIX heartbeat_crm: Is now compatible with more forms of crm_mon output formats
---
.werks/2971 | 9 +++++++++
ChangeLog | 1 +
checks/heartbeat_crm | 19 ++++++++++++++++---
3 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/.werks/2971 b/.werks/2971
new file mode 100644
index 0000000..755c9e4
--- /dev/null
+++ b/.werks/2971
@@ -0,0 +1,9 @@
+Title: heartbeat_crm: Is now compatible with more forms of crm_mon output formats
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453897233
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 2dda256..49f7d06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -224,6 +224,7 @@
* 2962 FIX: esx_vsphere_vm.guest_tools: Fixed exception in case no version info is available
* 2963 FIX: esx_vsphere_datastores: Deal with empty url attribute of datastores
* 2983 FIX: netapp_api_disk: fixed exception when disks were not included in the raid...
+ * 2971 FIX: heartbeat_crm: Is now compatible with more forms of crm_mon output formats
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/heartbeat_crm b/checks/heartbeat_crm
index 5070704..d8bde4e 100644
--- a/checks/heartbeat_crm
+++ b/checks/heartbeat_crm
@@ -75,10 +75,23 @@ def heartbeat_crm_parse_general(info):
num_nodes = None
num_resources = None
for line in info:
- if ' '.join(line[0:2]) == 'Last updated:':
- last_updated = ' '.join(line[2:])
- elif ' '.join(line[0:2]) == 'Current DC:':
+ line_txt = ' '.join(line)
+
+ if line_txt.startswith("Last updated:"):
+ if "Last change:" in line_txt:
+ # Some versions seem to combine both lines
+ last_updated = line_txt[:line_txt.index("Last change:")].split(": ")[1].strip()
+ else:
+ last_updated = ' '.join(line[2:])
+
+ elif line_txt.startswith('Current DC:'):
dc = line[2]
+
+ elif "nodes and" in line_txt and "resources configured" in line_txt:
+ # Some versions put number of nodes and resources in one line
+ num_nodes = int(line[0])
+ num_resources = int(line[3])
+
elif ' '.join(line[1:3]).rstrip('.,') == 'Nodes configured':
num_nodes = int(line[0])
elif ' '.join(line[1:3]).rstrip('.,') == 'Resources configured':
Module: check_mk
Branch: master
Commit: 147b20e1bcb8dadc052c17644ed51f44746a527a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=147b20e1bcb8da…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 27 11:00:06 2016 +0100
Updated bug entries #2379, #2359
---
.bugs/2359 | 9 ++++++---
.bugs/2379 | 6 ++++--
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/.bugs/2359 b/.bugs/2359
index 1f5c04a..9544c9b 100644
--- a/.bugs/2359
+++ b/.bugs/2359
@@ -1,9 +1,12 @@
Title: Quotes in generated confirmation messages are htmlized incorrectly
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2015-08-31 16:18:23
Targetversion: 1.2.7
-Class: bug
Apparently the mechanism to convert " into " is incorrect or applied in places where this isn't required. One reproducable example is when hitting the "Send monitoring notification" button in the Event Console the confirmation message is "Do you really want to execute that action "Send monitoring notification" the following 1 Event Console Events?".
-Apart from the that the grammer is quite bad imho.
\ No newline at end of file
+Apart from the that the grammer is quite bad imho.
+2016-01-27 10:59:57: changed state open -> done
+This was a simple issue in this exception text, not a general problem of the generic exception handling.
+Solved.
diff --git a/.bugs/2379 b/.bugs/2379
index 07218e5..a6ec770 100644
--- a/.bugs/2379
+++ b/.bugs/2379
@@ -1,10 +1,12 @@
Title: Drop action menu icon for services without an entry in this
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2015-09-22 09:53:11
Targetversion: future
-Class: bug
In certain circumstances the dropdown menu for a host or service can be
completely empty (e.g. when using cmcdump). Drop this menu completely in
that case.
+
+2016-01-27 10:56:40: changed state open -> done
Module: check_mk
Branch: master
Commit: bb9d4acf851027b01f229de2bfc09172849d5d32
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bb9d4acf851027…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 27 10:56:30 2016 +0100
#2967 FIX Hosts/Services: Hiding action menu trigger for empty menus
---
.bugs/2310 | 7 +++++--
.werks/2967 | 9 +++++++++
ChangeLog | 1 +
web/plugins/icons/builtin.py | 4 ++++
web/plugins/views/painters.py | 10 +++++++---
5 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/.bugs/2310 b/.bugs/2310
index 2cc09dc..fa0760f 100644
--- a/.bugs/2310
+++ b/.bugs/2310
@@ -1,11 +1,14 @@
Title: Quicksearch: service list of host not sorted
Component: multisite
-State: open
+Class: nastiness
+State: done
Date: 2015-04-07 10:31:05
Targetversion: future
-Class: nastiness
When you enter h:somehost s:... then you will see a list of the
service of the host. This list is not but should be sorted
alphabetically. Might be the case that only with CMC it's not
sorted...
+
+2016-01-27 10:45:51: changed state open -> done
+solved.
diff --git a/.werks/2967 b/.werks/2967
new file mode 100644
index 0000000..281143e
--- /dev/null
+++ b/.werks/2967
@@ -0,0 +1,9 @@
+Title: Hosts/Services: Hiding action menu trigger for empty menus
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453888557
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index d29ea7f..b45faa3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -267,6 +267,7 @@
* 2956 FIX: Fixed exception on "Availability of Single-Host Aggregations view
* 2965 FIX: Fixed HTML code shown in filter selection of favorite hosts filter
* 2966 FIX: Quicksearch: Fixed sorting of results when not only searching for hosts
+ * 2967 FIX: Hosts/Services: Hiding action menu trigger for empty menus
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index be68384..e39837a 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -84,6 +84,10 @@ def paint_action_menu(what, row, tags, host_custom_vars):
if html.has_var('_display_options'):
url_vars.append(('_display_options', html.var('_display_options')))
+ icons = get_icons(what, row, toplevel=False)
+ if not icons:
+ return # Don't paint the menu trigger when the menu would be empty
+
return html.render_popup_trigger(
html.render_icon('menu', _('Open the action menu'), cssclass="iconbutton"),
'action_menu', 'action_menu', url_vars=url_vars)
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 04a5598..22ebc66 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -308,6 +308,10 @@ def paint_icons(what, row):
return "icons", output
+# toplevel may be
+# True to get only columns for top level icons
+# False to get only columns for dropdown menu icons
+# None to get columns for all active icons
def iconpainter_columns(what, toplevel):
cols = set(['site',
'host_name',
@@ -323,7 +327,7 @@ def iconpainter_columns(what, toplevel):
])
for icon_id, icon in get_multisite_icons().items():
- if toplevel == icon['toplevel']:
+ if toplevel == None or toplevel == icon['toplevel']:
if 'columns' in icon:
cols.update([ what + '_' + c for c in icon['columns'] ])
cols.update([ "host_" + c for c in icon.get("host_columns", [])])
@@ -336,7 +340,7 @@ multisite_painters["service_icons"] = {
"title" : _("Service icons"),
"short" : _("Icons"),
"printable" : False, # does not contain printable text
- "columns" : lambda: iconpainter_columns("service", toplevel=True),
+ "columns" : lambda: iconpainter_columns("service", toplevel=None),
"groupby" : lambda row: "", # Do not account for in grouping
"paint" : lambda row: paint_icons("service", row)
}
@@ -345,7 +349,7 @@ multisite_painters["host_icons"] = {
"title" : _("Host icons"),
"short" : _("Icons"),
"printable" : False, # does not contain printable text
- "columns" : lambda: iconpainter_columns("host", toplevel=True),
+ "columns" : lambda: iconpainter_columns("host", toplevel=None),
"groupby" : lambda row: "", # Do not account for in grouping
"paint" : lambda row: paint_icons("host", row)
}