Module: check_mk
Branch: master
Commit: 9e4d6f3bcce383d57cb6ab10a70ab2798a7fb434
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9e4d6f3bcce383…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Wed Jan 15 10:26:39 2014 +0100
minor changes in behaviour of IO section, removed last old cmciii check cmciii_access
---
checks/cmciii_access | 65 --------------------------------------------------
1 file changed, 65 deletions(-)
diff --git a/checks/cmciii_access b/checks/cmciii_access
deleted file mode 100644
index 90ac668..0000000
--- a/checks/cmciii_access
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/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.
-
-
-def inventory_cmciii_access(info):
- inventory = []
- for line in info[0]:
- if line[0] == "Door" or line[0] == "ACCESS":
- id, num = line[1].split(".")
- if num == "1":
- item = line[0] +" " + id
- inventory.append( (item , None ))
- return inventory
-
-def check_cmciii_access(item, params, info):
- itemtype, itemnum = item.split(" ")
- for line in info[0]:
- id, num = line[1].split(".")
- if itemnum == id:
- if (itemtype == "Door" and num == "5") or (itemtype ==
"ACCESS" and num == "4"):
- infotext = "-".join(info[1][int(id)-1])
- infotext += ": " + line[0]
- state = 2
- if line[0] == "Closed":
- state = 0
- return (state, infotext )
-
- return (3, "Item not found in SNMP data")
-
-
-check_info['cmciii_access'] = {
- "check_function" : check_cmciii_access,
- "inventory_function" : inventory_cmciii_access,
- "has_perfdata" : False,
- "service_description" : "%s",
- "snmp_scan_function" : lambda oid: "Rittal CMC III PU" in
oid(".1.3.6.1.2.1.1.1.0").replace("-", " "),
- "snmp_info" : [
- [".1.3.6.1.4.1.2606.7.4.2.2.1", [
"10", OID_END ] ],
- [".1.3.6.1.4.1.2606.7.4.1.2.1", (
"2", "3" ) ]
- ]
-}
-