Module: check_mk
Branch: master
Commit: 830bfc4b5b5a8f7c299cc6ed212e45e5119e3d38
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=830bfc4b5b5a8f…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Mon Mar 3 11:13:55 2014 +0100
FIX if64: problems resolved when running as a clustered service
When running as a clustered service counter warps may have been triggered
without actual reason, leading to invalid unknown check results. This
has been fixed.
---
.werks/587 | 10 ++++++++++
ChangeLog | 3 ++-
checks/if.include | 11 ++++++++---
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/.werks/587 b/.werks/587
new file mode 100644
index 0000000..f0c616a
--- /dev/null
+++ b/.werks/587
@@ -0,0 +1,10 @@
+Title: if64: problems resolved when running as a clustered service
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1393841515
+Class: fix
+
+When running as a clustered service counter warps may have been triggered
+without actual reason, leading to invalid unknown check results. This
+has been fixed.
diff --git a/ChangeLog b/ChangeLog
index d6ac156..785b75f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -93,8 +93,8 @@
* 0556 esx_vsphere_counters.diskio: now also shows disk latency
* 0583 stulz_pump: now monitors the pumps rpm in precent of maximum and gathers
performance data
* 0560 check_mk_agent.solaris: report statgrab_mem section if solaris_mem section is
missing...
- * 0586 rmon_stats: new snmp check to gather network traffic statistics on RMON
enabled network interfaces
* 0702 Rule for checking agents for wanted version...
+ * 0586 rmon_stats: new snmp check to gather network traffic statistics on RMON
enabled network interfaces
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
@@ -187,6 +187,7 @@
* 0719 FIX: postfix_mailq: fix Linux agent in case of ssmtp being installed
* 0584 FIX: agent_vsphere: special agent now handles non-standard https port
correctly...
* 0585 FIX: check_mk_agent.linux: more efficient handling of cups printer queues...
+ * 0587 FIX: if64: problems resolved when running as a clustered service...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/if.include b/checks/if.include
index a915911..897fb12 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -501,9 +501,14 @@ def check_if_common_single(item, params, info, force_counter_wrap =
False, has_n
( "outerr", ifOutErrors, err_warn, err_crit, None, None) ]:
try:
- timedif, rate = get_counter("if.%s.%s" % (name, item),
this_time, saveint(counter))
- if force_counter_wrap:
- raise MKCounterWrapped("if.%s.%s" % (name, item),
"Forced counter wrap")
+ if node == None:
+ timedif, rate = get_counter("if.%s.%s" % (name, item),
this_time, saveint(counter))
+ if force_counter_wrap:
+ raise MKCounterWrapped("if.%s.%s" % (name, item),
"Forced counter wrap")
+ else: # clustered check needs one counter per variable, item AND
NODE
+ timedif, rate = get_counter("if.%s.%s.%s" % (node,
name, item), this_time, saveint(counter))
+ if force_counter_wrap:
+ raise MKCounterWrapped("if.%s.%s.%s" % (node, name,
item), "Forced counter wrap")
rates.append(rate)
perfdata.append( (name, rate, warn, crit, mmin, mmax) )
except MKCounterWrapped: