Module: check_mk
Branch: master
Commit: b8dcb4d2b5a44a555f903340a4d0080e7b5bec90
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b8dcb4d2b5a44a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 21 11:06:27 2013 +0100
FIX Interface Checks: Counters are now skipped when interface is down
In most cases it was no problem to check the counter values, as they
are reset to zero for most devices. But for some devices, the counters
are still having values - and maybe also change. To handle this, we
simply ignore the counter values for down interfaces.
---
.werks/233 | 11 +++++++++++
ChangeLog | 1 +
checks/if.include | 8 ++++++++
3 files changed, 20 insertions(+)
diff --git a/.werks/233 b/.werks/233
new file mode 100644
index 0000000..2f8d076
--- /dev/null
+++ b/.werks/233
@@ -0,0 +1,11 @@
+Title: Interface Checks: Counters are now skipped when interface is down
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1385028294
+Class: fix
+
+In most cases it was no problem to check the counter values, as they
+are reset to zero for most devices. But for some devices, the counters
+are still having values - and maybe also change. To handle this, we
+simply ignore the counter values for down interfaces.
diff --git a/ChangeLog b/ChangeLog
index f4953e8..fe66ca4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* 0209 FIX: Cleaned up bad code in fileinfo.groups check
* 0003 FIX: ps: Remove exceeding [ and ] in service description when using process inventory...
* 0037 FIX: checkman: alcatel power - now with correct classification...
+ * 0233 FIX: Interface Checks: Counters are now skipped when interface is down...
Multisite:
* 0001 New filters for selecting several host/service-groups at once...
diff --git a/checks/if.include b/checks/if.include
index edf9723..54938e4 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -444,6 +444,14 @@ def check_if_common_single(item, params, info, force_counter_wrap = False):
speed_b_in = assumed_speed_in and assumed_speed_in / 8 or ref_speed
speed_b_out = assumed_speed_out and assumed_speed_out / 8 or ref_speed
+ # When the interface is reported as down, there is no need to try to handle,
+ # the performance counters. Most devices do reset the counter values to zero,
+ # but we spotted devices, which do report error packes even for down interfaces.
+ # To deal with it, we simply skip over all performance counter checks for down
+ # interfaces.
+ if operstatus == "down":
+ return state, infotext
+
# Performance counters
this_time = time.time()
rates = []
Module: check_mk
Branch: master
Commit: 4ce4db5b45ae5bb4bf413cc805c1cc5917ddb71e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ce4db5b45ae5b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 20 15:05:54 2013 +0100
Updated bug entries #1025, #0925
---
.bugs/1025 | 6 ++++--
.bugs/925 | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/.bugs/1025 b/.bugs/1025
index 6e927e5..a1ebc7e 100644
--- a/.bugs/1025
+++ b/.bugs/1025
@@ -1,11 +1,13 @@
Title: HTML tags are interpreted on Global Settings page
Component: wato
-State: open
+Class: bug
+State: done
Date: 2013-11-14 23:58:41
Targetversion: 1.2.3i6
-Class: bug
Mail template, parameters in mail command or
page title might contain < or > chars which are interpreted
as html tags on the global settings page. These tags should
really be escaped somehow.
+
+2013-11-20 15:04:54: changed state open -> done
diff --git a/.bugs/925 b/.bugs/925
index f773bca..603b335 100644
--- a/.bugs/925
+++ b/.bugs/925
@@ -1,12 +1,14 @@
Title: HTML mails not rendered correctly in outlook
Component: core
-State: open
+Class: bug
+State: done
Date: 2013-06-27 13:58:29
Targetversion: 1.2.3i6
-Class: bug
It seems that current outlook versions, like e.g. 2010, use some sort of stripped html.
The html code sent by the html/graph mails does not seem to be compatible to this.
We should try to reproduce this on a system and then fix it there. This requires a lot
trial/error - so we should do this together with a customer on an affected system.
+
+2013-11-20 15:05:33: changed state open -> done
Module: check_mk
Branch: master
Commit: e680d189362bcacd02f0585e16fd02a4023fd9df
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e680d189362bca…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Nov 20 14:46:31 2013 +0100
New Check for Areca Raid Controllers
---
.werks/97 | 7 ++++
ChangeLog | 1 +
agents/plugins/arc_raid_status.sh | 5 +++
checkman/arc_raid_status | 19 ++++++++++
checks/arc_raid_status | 70 +++++++++++++++++++++++++++++++++++++
5 files changed, 102 insertions(+)
diff --git a/.werks/97 b/.werks/97
new file mode 100644
index 0000000..0471348
--- /dev/null
+++ b/.werks/97
@@ -0,0 +1,7 @@
+Title: New Check for Areca Raid Controllers
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1384955153
+Class: feature
+
diff --git a/ChangeLog b/ChangeLog
index c647592..beab0ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
* 0069 veeam_client: limits for time since last backup introduced
* 0214 Logwatch: context lines can now be disabled using nocontext=1...
* 0038 New checks for casa: casa_cpu_mem casa_cpu_temp casa_cpu_util casa_fan casa_power
+ * 0097 New Check for Areca Raid Controllers
* 0024 FIX: cisco_wlc: removed configuration parameter ap_model
* 0065 FIX: veeam_client: check behaviour improved when backup is in progress
* 0066 FIX: veeam_jobs: check behaviour improved when backup is in progress
diff --git a/agents/plugins/arc_raid_status.sh b/agents/plugins/arc_raid_status.sh
new file mode 100644
index 0000000..fa3a722
--- /dev/null
+++ b/agents/plugins/arc_raid_status.sh
@@ -0,0 +1,5 @@
+#cli64 can be found at:
+# ftp://ftp.areca.com.tw/RaidCards/AP_Drivers/Linux/CLI/
+
+echo "<<<arc_raid_status>>>"
+cli64 rsf info | tail -n +3 | head -n -2
diff --git a/checkman/arc_raid_status b/checkman/arc_raid_status
new file mode 100644
index 0000000..105c905
--- /dev/null
+++ b/checkman/arc_raid_status
@@ -0,0 +1,19 @@
+title: Areca Raid Controllers
+agents: linux
+catalog: os/storage
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the health and current Status of a areca raid controller.
+ The check returns a {CRIT} for Degarde and Incompleted, {WARN} in case of Rebuilding.
+ Also {CRIT} is returned is an case that the number of disks in the array Changes.
+ The cli64 has be installed for the agent plugin to work. It can be downloaded here:
+ ftp://ftp.areca.com.tw/RaidCards/AP_Drivers/Linux/CLI/
+
+
+item:
+ The numeric number of the array, reported by areca cli tool
+
+inventory:
+ One check is created for array
+
diff --git a/checks/arc_raid_status b/checks/arc_raid_status
new file mode 100644
index 0000000..9d72745
--- /dev/null
+++ b/checks/arc_raid_status
@@ -0,0 +1,70 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# Example output from agent:
+# 1 Raid Set # 00 3 2250.5GB 0.0GB 123 Normal
+# ( # Name Disks TotalCap FreeCap DiskChannels State )
+
+def inventory_arc_raid_status(info):
+ return [ ( x[0], saveint(x[-5]) ) for x in info ]
+
+def check_arc_raid_status(item, params, info):
+ for line in info:
+ if line[0] == item:
+ messages = []
+ state = 0
+
+ raid_state = line[-1]
+ label = ""
+ if raid_state in [ "Degarde", "Incompleted" ]:
+ state = 2
+ label = "(!!)"
+ elif raid_state == "Rebuilding":
+ state = 1
+ label = "(!)"
+ elif raid_state != "Normal":
+ state = 2
+ label = "(!!)"
+ messages.append("Raid in state: %s%s" % ( raid_state, label ))
+
+ # Check the number of disks
+ i_disks = params
+ c_disks = saveint(line[-5])
+ if i_disks != c_disks:
+ message.append("Number of disks has changed from %d to %d(!!)" % ( i_disks, c_disks ))
+ state = 2
+
+ return state, ", ".join(messages)
+
+ return 3, "Array not found"
+
+check_info["arc_raid_status"] = {
+ "check_function" : check_arc_raid_status,
+ "inventory_function" : inventory_arc_raid_status,
+ "service_description" : "Raid Array #%s",
+ "has_perfdata" : False,
+}
+