Module: check_mk
Branch: master
Commit: 8ea7c9c70c0d136e80e993ffd6594801e4aa6b38
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8ea7c9c70c0d13…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 10 12:55:25 2011 +0100
cisco_locif: The check has been removed. Please switch to if/if64
---
ChangeLog | 3 ++-
checks/cisco_locif | 28 +++-------------------------
2 files changed, 5 insertions(+), 26 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4d59b44..08162ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,7 +8,8 @@
Checks & Agents:
* printer_supply: Changed order of tests. When a printer reports -3 this
is used before the check if maxlevel is -2.
- * cisco_locif: Added snmp scan function
+ * cisco_locif: The check has been removed. Please switch to if/if64
+
1.1.10:
Core, Setup, etc.:
diff --git a/checks/cisco_locif b/checks/cisco_locif
index 82bc517..df08937 100644
--- a/checks/cisco_locif
+++ b/checks/cisco_locif
@@ -26,31 +26,10 @@
def inventory_cisco_locif(checkname, info):
- # line[0] => cdpInterfaceName, like "GigabitEthernet1/17"
- # line[1] => locIfLineProt, 1 or 0
- # line[4] => locIfDescr
- inventory = []
- for line in info:
- item = line[0] != '' and line[0] or line[5]
- descr = line[4] != '' and line[4] or line[5]
- if line[1] == '1':
- inventory.append((item, descr, '""'))
- return inventory
+ pass
def check_cisco_locif(item, params, info):
- for line in info:
- this_item = line[0] != '' and line[0] or line[5]
- if this_item == item:
- input_rate = int(line[2])
- output_rate = int(line[3])
- perfdata = [ ("input_rate", input_rate),
- ("output_rate", output_rate) ]
- if line[1] == '1':
- return(0, "OK - %s" % line[4], perfdata)
- else:
- return(2, "CRIT - %s has no link" % line[4], perfdata)
-
- return (3, 'UNKNOWN - Port %s ("%s") not found in SNMP data' %
(item, line[4]))
+ return (3, 'UNKNOWN - The cisco_locif check has been removed. Please switch to
either if or if64 checks')
check_info['cisco_locif'] = (check_cisco_locif, "Port %s", 1,
inventory_cisco_locif)
snmp_info['cisco_locif'] = ( ".1.3.6.1.4.1.9",
@@ -61,5 +40,4 @@ snmp_info['cisco_locif'] = ( ".1.3.6.1.4.1.9",
"2.2.1.1.28", #
OLD-CISCO-INTERFACES-MIB::locIfDescr
OID_END ] )
-snmp_scan_functions['cisco_fan'] = \
- lambda oid: "cisco" in oid(".1.3.6.1.2.1.1.1.0").lower()
+snmp_scan_functions['cisco_fan'] = False