Module: check_mk
Branch: master
Commit: 4159e127c0d3ea1bd5497f06cf07431fbdba3cb0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4159e127c0d3ea…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Dec 10 09:49:21 2015 +0100
esx_vsphere_sensors: added some documentation regarding incorrect sensor data
---
checks/esx_vsphere_sensors | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/checks/esx_vsphere_sensors b/checks/esx_vsphere_sensors
index ffb084a..a771625 100644
--- a/checks/esx_vsphere_sensors
+++ b/checks/esx_vsphere_sensors
@@ -24,6 +24,12 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+
+# Note: Sometimes the esx_vsphere_sensors check reports incorrect sensor data.
+# The reason is that the data is cached on the esx system. In the worst case some sensors
+# might get stuck in an unhealthy state. You can find more information under the following link:
+# http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externa…
+
# <<<esx_vsphere_sensors:sep(59)>>>
# VMware Rollup Health State;;0;system;0;;red;Red;Sensor is operating under critical conditions
# Power Domain 1 Power Unit 0 - Redundancy lost;;0;power;0;;yellow;Yellow;Sensor is operating under conditions that are non-critical
Module: check_mk
Branch: master
Commit: 97164d0d8a897f03c10849e64de989410c1e9bbe
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=97164d0d8a897f…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Dec 10 09:20:59 2015 +0100
iwyu + clang-format.
---
livestatus/src/strutil.cc | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/livestatus/src/strutil.cc b/livestatus/src/strutil.cc
index 5660570..fedb373 100644
--- a/livestatus/src/strutil.cc
+++ b/livestatus/src/strutil.cc
@@ -22,16 +22,15 @@
// to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
// Boston, MA 02110-1301 USA.
-#include <string.h>
-#include <ctype.h>
-
#include "strutil.h"
+#include <ctype.h>
+#include <stddef.h>
+#include <string.h>
char *rstrip(char *c)
{
char *w = c + strlen(c) - 1;
- while (w >= c && isspace(*w))
- *w-- = '\0';
+ while (w >= c && isspace(*w)) *w-- = '\0';
return c;
}
@@ -41,11 +40,9 @@ char *lstrip(char *c)
return c;
}
-/* *c points to a string containing
- white space separated columns. This method returns
- a pointer to the zero-terminated next field. That
- might be identical with *c itself. The pointer c
- is then moved to the possible beginning of the
+/* *c points to a string containing white space separated columns. This method
+ returns a pointer to the zero-terminated next field. That might be identical
+ with *c itself. The pointer c is then moved to the possible beginning of the
next field. */
char *next_field(char **c)
{
@@ -56,8 +53,8 @@ char *next_field(char **c)
return 0; // found end of string -> no more field
}
- char *end = begin; // copy pointer, search end of field
- while (*end && !isspace(*end)) end++; // search for \0 or white space
+ char *end = begin; // copy pointer, search end of field
+ while (*end && !isspace(*end)) end++; // search for \0 or white space
if (*end) { // string continues -> terminate field with '\0'
*end = '\0';
*c = end + 1; // skip to character right *after* '\0'
@@ -91,8 +88,7 @@ char *next_token(char **c, char delim)
no tokens has been found */
char *save_next_token(char **c, char delim)
{
- if (!*c)
- return (char *)"";
+ if (!*c) return (char *)"";
char *result = next_token(c, delim);
if (result == 0)
@@ -108,5 +104,3 @@ int ends_with(const char *a, const char *b)
size_t len_b = strlen(b);
return len_a >= len_b && strcmp(a + len_a - len_b, b) == 0;
}
-
-
Module: check_mk
Branch: master
Commit: 072f80100d13dd61afc4f07f01e8ee4029bb7171
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=072f80100d13dd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 9 08:32:10 2015 +0100
When monitoring clustered hosts using Nagios as core, the Check_MK service always
resulted in an UNKNOWN state and this exception:
NameError: global name 'set_use_cachefile' is not defined
Conflicts:
ChangeLog
modules/check_mk.py
---
.werks/2894 | 13 +++++++++++++
ChangeLog | 1 +
modules/check_mk.py | 9 +--------
modules/check_mk_base.py | 5 +++++
4 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/.werks/2894 b/.werks/2894
new file mode 100644
index 0000000..5b96ca9
--- /dev/null
+++ b/.werks/2894
@@ -0,0 +1,13 @@
+Title: Fixed broken cluster checks when using Nagios core
+Level: 2
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449646012
+
+When monitoring clustered hosts using Nagios as core, the Check_MK service always
+resulted in an UNKNOWN state and this exception:
+
+NameError: global name 'set_use_cachefile' is not defined
diff --git a/ChangeLog b/ChangeLog
index 9be5a43..efcbdfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
* 2764 FIX: Fixed broken SNMP checks in case SNMP check interval is configured for clusters...
* 2770 FIX: Check_MK is now warning the user about deprecated but configured checkgroup parameters...
* 2848 FIX: Fixed cleanup of old autocheck files of cluster hosts...
+ * 2894 FIX: Fixed broken cluster checks when using Nagios core...
Checks & Agents:
* 2434 NetApp monitoring: Cluster-Mode is now supported, changes in existing 7Mode checks...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 25436c0..a949c75 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1352,12 +1352,6 @@ orig_cluster_max_cachefile_age = None
orig_inventory_max_cachefile_age = None
-def set_use_cachefile(state=True):
- global opt_use_cachefile, orig_opt_use_cachefile
- orig_opt_use_cachefile = opt_use_cachefile
- opt_use_cachefile = state
-
-
def restore_use_cachefile():
global opt_use_cachefile, orig_opt_use_cachefile
if orig_opt_use_cachefile != None:
@@ -4622,8 +4616,7 @@ def do_check_keepalive():
sys.stderr.flush()
cleanup_globals() # Prepare for next check
- global opt_use_cachefile
- opt_use_cachefile = True
+ restore_use_cachefile()
restore_original_agent_caching_usage()
# Check if all global variables are clean, but only in verbose logging mode
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index e25eae0..0fb0f06 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1999,6 +1999,11 @@ def worst_monitoring_state(status_a, status_b):
return max(status_a, status_b)
+def set_use_cachefile(state=True):
+ global opt_use_cachefile, orig_opt_use_cachefile
+ orig_opt_use_cachefile = opt_use_cachefile
+ opt_use_cachefile = state
+
#.
# .--Check helpers-------------------------------------------------------.