fixed one missing disk in summary check
Message-ID: <55362f2d./0meDl98TeXyJVhp%ab(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 56131db24a03a402e4793ef0cc401f39eb456ff1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=56131db24a03a4…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Apr 21 13:05:45 2015 +0200
#2069 FIX netapp_api_disk.summary: fixed one missing disk in summary check
The library function responsible for parsing the agent data did omit the last
disk entry, thus leading to an invalid disk count and possibly missing error data.
---
.werks/2069 | 11 +++++++++++
ChangeLog | 2 ++
checks/netapp_api.include | 2 ++
3 files changed, 15 insertions(+)
diff --git a/.werks/2069 b/.werks/2069
new file mode 100644
index 0000000..b3f569b
--- /dev/null
+++ b/.werks/2069
@@ -0,0 +1,11 @@
+Title: netapp_api_disk.summary: fixed one missing disk in summary check
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1429614114
+
+The library function responsible for parsing the agent data did omit the last
+disk entry, thus leading to an invalid disk count and possibly missing error data.
diff --git a/ChangeLog b/ChangeLog
index 10eceb9..029cd37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -335,6 +335,7 @@
* 2067 FIX: windows agent: product version is no longer set to 1.0.0...
* 2068 FIX: Filesystem checks: Fix crash when legacy parameters (tuple) were used...
* 2213 FIX: cisco_temperature: Fixed behaviour in cases where device reports status but no temperature...
+ * 2069 FIX: netapp_api_disk.summary: fixed one missing disk in summary check...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
@@ -460,6 +461,7 @@
* 1662 notification plugin spectrum: finalized script. now able to handle host notications
* 1213 New Notification macros $SERVICEFORURL$ and $HOSTFORURL$...
* 2041 Notification Spooler can now handle incoming and outgoing persistent TCP connections...
+ NOTE: Please refer to the migration notes!
* 2135 Allow to filter notification contacts based on values of custom macros...
* 1235 Added notification plugin for Braintower SMS Gateways...
* 2188 Rule based notification now allow match for notification comment...
diff --git a/checks/netapp_api.include b/checks/netapp_api.include
index c77914a..d1926f6 100644
--- a/checks/netapp_api.include
+++ b/checks/netapp_api.include
@@ -88,6 +88,7 @@ def netapp_api_convert_info(info, configs = {}, counter_key = None, counter_as_k
while True:
line = lines.next()
if line[0] == "[config_instance]":
+ add_config()
add_counter()
current_counter = {}
is_config = True
@@ -95,6 +96,7 @@ def netapp_api_convert_info(info, configs = {}, counter_key = None, counter_as_k
continue
elif line[0] == "[counter_instance]":
add_config()
+ add_counter()
current_config = {}
is_config = False
continue
Module: check_mk
Branch: master
Commit: 45ad80353e950b04804b5cb212da699ce1e98244
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=45ad80353e950b…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Apr 21 11:33:41 2015 +0200
set werk #2041 (new mknotifyd) to incompabtible. configuration needs to be redone
---
.werks/2041 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.werks/2041 b/.werks/2041
index e9c7d60..40cd002 100644
--- a/.werks/2041
+++ b/.werks/2041
@@ -1,7 +1,7 @@
Title: Notification Spooler can now handle incoming and outgoing persistent TCP connections
Level: 2
Component: notifications
-Compatible: compat
+Compatible: incomp
Version: 1.2.7i1
Date: 1425463954
Class: feature
@@ -32,3 +32,6 @@ spooler. We propose starting with the highest log level. Also a file
<tt>var/log/mknotifyd.log</tt> is being written every 20 seconds. It
shows the state of the spooler and its connections. This is being used
for the monitoring of the spooler.
+
+Note: To get the new mknotifyd running you need to reconfigure its global settings.
+Otherwise it will use the incompatible configuration of the previous version.
Module: check_mk
Branch: master
Commit: 165a09fb5f9f769a0b5343c7cf51907b49300e88
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=165a09fb5f9f76…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 21 10:49:26 2015 +0200
Improved handling of graph hover when distributed site is not reachable
---
web/htdocs/check_mk.css | 5 +++++
web/htdocs/js/checkmk.js | 2 +-
web/htdocs/livestatus.py | 6 +++++-
web/htdocs/metrics.py | 8 +++++++-
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 88674a7..80349a2 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -553,3 +553,8 @@ div#hover_menu {
z-index: 40;
color: #000;
}
+
+div#hover_menu div.error {
+ width:350px;
+ margin: 0;
+}
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 43f6dd2..28a905c 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -812,7 +812,7 @@ function hover_graph(site, host_name, service)
// the expected code, simply display an error message.
if (c.indexOf('/image?') === -1) {
// Error! unexpected response
- c = '<div style="background-color:#BA2C2C;width:350px;padding:5px"> '
+ c = '<div class="error"> '
+ 'ERROR: Received an unexpected response '
+ 'while trying to display the PNP-Graphs. Maybe there is a problem with the '
+ 'authentication.</div>';
diff --git a/web/htdocs/livestatus.py b/web/htdocs/livestatus.py
index cc67c40..562345f 100644
--- a/web/htdocs/livestatus.py
+++ b/web/htdocs/livestatus.py
@@ -109,7 +109,11 @@ class Helpers:
def query_row(self, query):
"""Issues a query that returns one line of data and returns the elements
of that line as list"""
- return self.query(query, "ColumnHeaders: off\n")[0]
+ result = self.query(query, "ColumnHeaders: off\n")
+ try:
+ return result[0]
+ except IndexError:
+ raise MKLivestatusNotFoundError(query)
def query_row_assoc(self, query):
"""Issues a query that returns one line of data and returns the elements
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index e1a17d3..ab1f578 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -37,6 +37,7 @@
import math, time
import config, defaults
from lib import *
+import livestatus
# Datastructures and functions needed before plugins can be loaded
loaded_with_language = False
@@ -957,7 +958,12 @@ def page_show_graph():
"Columns: perf_data metrics check_command\n" % (host_name, service)
html.live.set_only_sites([site])
- data = html.live.query_row(query)
+ try:
+ data = html.live.query_row(query)
+ except livestatus.MKLivestatusNotFoundError:
+ html.write('<div class="error">%s</div>' %
+ _('Failed to fetch data for graph. Maybe the site is not reachable?'))
+ return
html.live.set_only_sites(None)
if service == "_HOST_":
Module: check_mk
Branch: master
Commit: 9eff4edf7bd030742df58cb394bf8809413e685f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9eff4edf7bd030…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 20 15:20:33 2015 +0200
#2208 FIX Add missing Livestatus column service_period
This column was not being accessable due to the fact that it's
prefix is <tt>service_</tt>. This has been fixed.
Conflicts:
ChangeLog
livestatus/src/Table.cc
---
.werks/2208 | 11 +++++++++++
ChangeLog | 3 +++
livestatus/src/Table.cc | 11 +++++++++++
3 files changed, 25 insertions(+)
diff --git a/.werks/2208 b/.werks/2208
new file mode 100644
index 0000000..9877ef0
--- /dev/null
+++ b/.werks/2208
@@ -0,0 +1,11 @@
+Title: Add missing Livestatus column service_period
+Level: 1
+Component: livestatus
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1429535813
+
+This column was not being accessable due to the fact that it's
+prefix is <tt>service_</tt>. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index be01533..53eb04d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -500,6 +500,9 @@
* 2139 FIX: Fix exception in Event Console when archiving events with match groups and non ASCII characters
* 2151 FIX: Fixed wrong time in events when forwarding logwatch to EC between timezones...
+ Livestatus:
+ * 2208 FIX: Add missing Livestatus column service_period...
+
HW/SW-Inventory:
* 1846 Keep track of changes of software and hardware...
* 1855 esx_systeminfo: new inventory plugin to retrieve info about the host operating system for ESX servers
diff --git a/livestatus/src/Table.cc b/livestatus/src/Table.cc
index d462be2..cb526b6 100644
--- a/livestatus/src/Table.cc
+++ b/livestatus/src/Table.cc
@@ -105,6 +105,17 @@ Column *Table::column(const char *colname)
_columns_t::iterator it = _columns.find(string(colname));
if (it != _columns.end())
return it->second;
+
+ // Now we try to readd the removed prefix. That way we tackle the
+ // problem with the column "service_period". Here the prefix service_
+ // is part of the actual name of the column!
+ string with_prefix(prefixname(), prefix_len - 1);
+ with_prefix += "_";
+ with_prefix += colname;
+
+ it = _columns.find(with_prefix);
+ if (it != _columns.end())
+ return it->second;
else
return 0;
}