Module: check_mk
Branch: master
Commit: 6baf2cbabda4c046d459bb8f4fffc20389ecb623
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6baf2cbabda4c0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 12 10:18:19 2015 +0100
#2775 FIX omd_status: handle case where status information is incomplete due to missing cmk version
---
.werks/2775 | 9 +++++++++
ChangeLog | 1 +
checks/omd_status | 8 ++++++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/2775 b/.werks/2775
new file mode 100644
index 0000000..b56d5ca
--- /dev/null
+++ b/.werks/2775
@@ -0,0 +1,9 @@
+Title: omd_status: handle case where status information is incomplete due to missing cmk version
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1447319883
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 9f2be85..1634c35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -72,6 +72,7 @@
* 2761 FIX: check_http: Fixed handling of multiple strings given as "Strings to expect in server response"
* 2786 FIX: agent_netapp: now able to monitor more than 20 instances of a given type, e.g. volumes or interfaces...
* 2765 FIX: heartbeat_crm: Fixed issue detecting outdated data with daylight saving time
+ * 2775 FIX: omd_status: handle case where status information is incomplete due to missing cmk version
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/omd_status b/checks/omd_status
index 4e47cf9..f2764ec 100644
--- a/checks/omd_status
+++ b/checks/omd_status
@@ -80,9 +80,10 @@ def check_omd_status(item, _no_params, info):
stopped_nodes = 0
for node, services in parsed_site.iteritems():
- if services["overall"] == "stopped":
+ if "overall" in services and services["overall"] == "stopped":
stopped_nodes += 1
+
# stopped sites are only CRIT when all are stopped
if stopped_nodes == number_nodes:
state = 2
@@ -94,7 +95,10 @@ def check_omd_status(item, _no_params, info):
node_text = " on %s" % node
else:
node_text = ""
- if services["overall"] == "running":
+ if "overall" not in services:
+ infotext = "defective installation%s" % node_text
+ yield 2, infotext
+ elif services["overall"] == "running":
infotext = "running%s" % node_text
# running sites are always OK
yield 0, infotext
Module: check_mk
Branch: master
Commit: 8ab5416f7ccad822c42456b14af754f292b53e3a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8ab5416f7ccad8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 11 14:20:55 2015 +0100
The SNMP check interval caused the agent data of single nodes to be skipped for clusters
which could lead to CRITICAL clustered services which are based on SNMP checks.
Conflicts:
ChangeLog
modules/check_mk_base.py
---
.werks/2764 | 11 +++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 8 +++++++-
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.werks/2764 b/.werks/2764
new file mode 100644
index 0000000..f8f56d0
--- /dev/null
+++ b/.werks/2764
@@ -0,0 +1,11 @@
+Title: Fixed broken SNMP checks in case SNMP check interval is configured for clusters
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1447247901
+
+The SNMP check interval caused the agent data of single nodes to be skipped for clusters
+which could lead to CRITICAL clustered services which are based on SNMP checks.
diff --git a/ChangeLog b/ChangeLog
index dea1279..7c44447 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
* 2724 FIX: Discovery check: Fixed exception in simulation mode when no cache file present
* 2756 FIX: SNMP: Generalized error handling of emtpy info for SNMP checks...
* 2759 FIX: Allowing Emails to contain special characters like umlauts...
+ * 2764 FIX: Fixed broken SNMP checks in case SNMP check interval is configured for clusters...
Checks & Agents:
* 2434 NetApp monitoring: Cluster-Mode is now supported, changes in existing 7Mode checks...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index f13dee0..3951089 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -348,10 +348,13 @@ def get_host_info(hostname, ipaddress, checkname, max_cachefile_age=None, ignore
# If an error with the agent occurs, we still can (and must)
# try the other nodes.
try:
+ # We must ignore the SNMP check interval when dealing with SNMP
+ # checks on cluster nodes because the cluster is always reading
+ # the cache files of the nodes.
ipaddress = lookup_ip_address(node)
new_info = get_realhost_info(node, ipaddress, checkname,
max_cachefile_age == None and cluster_max_cachefile_age or max_cache_age,
- ignore_check_interval)
+ ignore_check_interval=True)
if new_info != None:
if add_nodeinfo:
new_info = [ [node] + line for line in new_info ]
@@ -425,6 +428,9 @@ def get_realhost_info(hostname, ipaddress, check_type, max_cache_age,
if oid_info:
cache_path = tcp_cache_dir + "/" + cache_relpath
+
+ # Handle SNMP check interval. The idea: An SNMP check should only be
+ # executed every X seconds. Skip when called too often.
check_interval = check_interval_of(hostname, check_type)
if not ignore_check_interval \
and not opt_dont_submit \
Module: check_mk
Branch: master
Commit: eeed19111fb284c97be546d9c5d36951a6a09d9f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eeed19111fb284…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Nov 11 14:10:53 2015 +0100
#2786 FIX agent_netapp: now able to monitor more than 20 instances of a given type, e.g. volumes or interfaces
The netapp agent was unable to output more than 20 instances.
This value was used as default when elements got queried with the help of an iterator.
---
.werks/2786 | 10 ++++++++++
ChangeLog | 1 +
agents/special/agent_netapp | 8 +++++++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/2786 b/.werks/2786
new file mode 100644
index 0000000..231c97a
--- /dev/null
+++ b/.werks/2786
@@ -0,0 +1,10 @@
+Title: agent_netapp: now able to monitor more than 20 instances of a given type, e.g. volumes or interfaces
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1447247271
+Class: fix
+
+The netapp agent was unable to output more than 20 instances.
+This value was used as default when elements got queried with the help of an iterator.
diff --git a/ChangeLog b/ChangeLog
index e7c9e05..dea1279 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,6 +68,7 @@
* 2701 FIX: zfsget: fixed handling in case of zero total size based on buggy 'df -h' command on some solaris systems...
* 2702 FIX: oracle_diva_csm: fixed handling of empty sublists
* 2761 FIX: check_http: Fixed handling of multiple strings given as "Strings to expect in server response"
+ * 2786 FIX: agent_netapp: now able to monitor more than 20 instances of a given type, e.g. volumes or interfaces...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index a5c6ca2..65b3ba1 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -264,7 +264,13 @@ def query_nodes(what, only_first = False, node_attribute = "node-name"):
section_errors = []
def query(what, return_toplevel_node = False):
- response = server.invoke(what)
+ # HACK: if "what" endswith get-iter, add max_records = 5000
+ # This approach is way easier than reading the tag, invoke another
+ # command and merge all answers together
+ if what.endswith("get-iter"):
+ response = server.invoke(what, "max-records", 5000)
+ else:
+ response = server.invoke(what)
if response.results_status() == "failed":
section_errors.append("In class %s: %s" % (what, response.results_reason()))
Module: check_mk
Branch: master
Commit: eec68385c04b9301c2346a5ca850f2d66cedbb10
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eec68385c04b93…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 11 13:03:06 2015 +0100
#2763 apache_status: Can now be configured to use the protocols default port
When specifiying None as port number, no port number is used to contact
the web server. The resulting service will also only contain the host name
without the tailing :[port].
---
.werks/2763 | 11 +++++++++++
ChangeLog | 1 +
agents/plugins/apache_status | 10 ++++++----
checks/apache_status | 5 ++++-
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/.werks/2763 b/.werks/2763
new file mode 100644
index 0000000..86600b4
--- /dev/null
+++ b/.werks/2763
@@ -0,0 +1,11 @@
+Title: apache_status: Can now be configured to use the protocols default port
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1447243247
+Class: feature
+
+When specifiying None as port number, no port number is used to contact
+the web server. The resulting service will also only contain the host name
+without the tailing :[port].
diff --git a/ChangeLog b/ChangeLog
index b6417a3..e7c9e05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,7 @@
* 2707 winperf_processor: can now be configured to warn if a single cpu core exceeds a utilization threshold for a while...
* 2708 sap, sap_state: new sap_state service reports connection problems to sap hosts...
* 2740 local: better warning output in case of invalid agent output
+ * 2763 apache_status: Can now be configured to use the protocols default port...
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/agents/plugins/apache_status b/agents/plugins/apache_status
index f06b05d..43978b6 100755
--- a/agents/plugins/apache_status
+++ b/agents/plugins/apache_status
@@ -128,8 +128,10 @@ for server in servers:
port = server['port']
page = server.get('page', 'server-status')
+ portspec = port and ":%d" % port or ""
+
try:
- url = '%s://%s:%s/%s?auto' % (proto, address, port, page)
+ url = '%s://%s%s/%s?auto' % (proto, address, portspec, page)
# Try to fetch the status page for each server
try:
request = urllib2.Request(url, headers={"Accept" : "text/plain"})
@@ -138,7 +140,7 @@ for server in servers:
if 'SSL23_GET_SERVER_HELLO:unknown protocol' in str(e):
# HACK: workaround misconfigurations where port 443 is used for
# serving non ssl secured http
- url = 'http://%s:%s/server-status?auto' % (address, port)
+ url = 'http://%s%s/server-status?auto' % (address, portspec)
fd = urllib2.urlopen(url)
else:
raise
@@ -151,7 +153,7 @@ for server in servers:
break
print address, port, line
except urllib2.HTTPError, e:
- sys.stderr.write('HTTP-Error (%s:%d): %s %s\n' % (address, port, e.code, e))
+ sys.stderr.write('HTTP-Error (%s%s): %s %s\n' % (address, portspec, e.code, e))
except Exception, e:
- sys.stderr.write('Exception (%s:%d): %s\n' % (address, port, e))
+ sys.stderr.write('Exception (%s%s): %s\n' % (address, portspec, e))
diff --git a/checks/apache_status b/checks/apache_status
index 14c2109..28b37bd 100644
--- a/checks/apache_status
+++ b/checks/apache_status
@@ -78,7 +78,10 @@ def apache_status_parse(info):
continue # Skip unexpected lines
label = (' '.join(line[2:-1])).rstrip(':')
value = _apache_status_fields[label][1](line[-1])
- item = '%s:%s' % (address, port)
+ if port == None:
+ item = address
+ else:
+ item = '%s:%s' % (address, port)
if item not in data:
data[item] = {}