Module: check_mk
Branch: master
Commit: 8f22e40118fa844d413e8d1d1352be70c356ee5c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8f22e40118fa84…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Tue Mar 25 11:57:22 2014 +0100
kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
---
.werks/598 | 8 +++++++
ChangeLog | 6 ++---
checkman/kentix_humidity | 13 ++++++++++
checkman/kentix_temp | 13 ++++++++++
checks/kentix_humidity | 59 ++++++++++++++++++++++++++++++++++++++++++++++
checks/kentix_temp | 59 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 155 insertions(+), 3 deletions(-)
diff --git a/.werks/598 b/.werks/598
new file mode 100644
index 0000000..73f8552
--- /dev/null
+++ b/.werks/598
@@ -0,0 +1,8 @@
+Title: kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1395744987
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index d7c3284..cc2d53a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -121,11 +121,11 @@
* 0595 dell_chassis_power, dell_chassis_powersupplies: new checks for Dell Poweredge Chassis Ppower consumption...
* 0596 dell_chassis_status, dell_chassis_temp, dell_chassis_kvm, dell_chassis_io, dell_chassis_fans: new checks to monitor the overall status of various sections of the Dell Poweredge Chassis via CMC
* 0597 dell_chassis_slots: new check to monitor the status of the blade slots of the Dell Poweredge Blade Servers
- * 0145 apc_symmetra: Changed naming of Batterie Temperature to System Temerature...
- NOTE: Please refer to the migration notes!
* 0759 check_notify_count: New active check to monitor the number of notifications sent to contacts...
* 0760 The windows agent contains meta information about version, manufacturer etc....
->>>>>>> 309bc055d22c0013242e9c3787049fbd6afb6ff1
+ * 0145 apc_symmetra: Changed naming of Batterie Temperature to System Temerature...
+ NOTE: Please refer to the migration notes!
+ * 0598 kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
* 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...
diff --git a/checkman/kentix_humidity b/checkman/kentix_humidity
new file mode 100644
index 0000000..8fa5874
--- /dev/null
+++ b/checkman/kentix_humidity
@@ -0,0 +1,13 @@
+title: Kentix MultiSensor-RACK: Humidity Sensor
+agents: snmp
+catalog: hw/server/kentix
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the humidity measured by the Kentix MultiSensor-RACK device.
+
+ No limits are set in the check, since limits are configured in the device
+ itself. These limits are taken as the lower and upper warning levels of the check.
+
+perfdata:
+ One variable: the humidity
diff --git a/checkman/kentix_temp b/checkman/kentix_temp
new file mode 100644
index 0000000..5cbb478
--- /dev/null
+++ b/checkman/kentix_temp
@@ -0,0 +1,13 @@
+title: Kentix MultiSensor-RACK: Temperature Sensor
+agents: snmp
+catalog: hw/server/kentix
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the temperature measured by the Kentix MultiSensor-RACK device.
+
+ No limits are set in the check, since limits are configured in the device
+ itself. These limits are taken as the lower and upper warning levels of the check.
+
+perfdata:
+ One variable: the temperature
diff --git a/checks/kentix_humidity b/checks/kentix_humidity
new file mode 100644
index 0000000..a47edec
--- /dev/null
+++ b/checks/kentix_humidity
@@ -0,0 +1,59 @@
+#!/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_kentix_humidity(info):
+ if info:
+ return [ (None, None ) ]
+
+def check_kentix_humidity(_no_item, _no_params, info):
+ value, lower_warn, upper_warn, alarm, text = info[0]
+ temp = float(value)/10
+ perfdata = [ ("temp", temp, lower_warn+":"+upper_warn ) ]
+ upper_warn = float(upper_warn)
+ lower_warn = float(lower_warn)
+ infotext = "%.1f%% (min/max at %.1f%%/%.1f%%)" % (temp, lower_warn, upper_warn)
+ if temp >= upper_warn or temp <= lower_warn:
+ state = 1
+ infotext = "%s: %s" % (text, infotext)
+ else:
+ state = 0
+ return state, infotext, perfdata
+
+check_info["kentix_humidity"] = {
+ 'check_function': check_kentix_humidity,
+ 'inventory_function': inventory_kentix_humidity,
+ 'service_description': 'Humidity',
+ 'has_perfdata': True,
+ 'snmp_info': ('.1.3.6.1.4.1.37954.3.1.2',
+ ['1', # humidityValue
+ '2', # humidityMin
+ '3', # humidityMax
+ '4', # humidityAlarm, not used
+ '5', # humidityAlarmtext
+ ]
+ ),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.332.11.6"),
+}
diff --git a/checks/kentix_temp b/checks/kentix_temp
new file mode 100644
index 0000000..d3bd2df
--- /dev/null
+++ b/checks/kentix_temp
@@ -0,0 +1,59 @@
+#!/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_kentix_temp(info):
+ if info:
+ return [ (None, None ) ]
+
+def check_kentix_temp(_no_item, _no_params, info):
+ value, lower_warn, upper_warn, alarm, text = info[0]
+ temp = float(value)/10
+ perfdata = [ ("temp", temp, lower_warn+":"+upper_warn ) ]
+ upper_warn = float(upper_warn)
+ lower_warn = float(lower_warn)
+ infotext = "%.1f C (min/max at %.1f/%.1f C)" % (temp, lower_warn, upper_warn)
+ if temp >= upper_warn or temp <= lower_warn:
+ state = 1
+ infotext = "%s: %s" % (text, infotext)
+ else:
+ state = 0
+ return state, infotext, perfdata
+
+check_info["kentix_temp"] = {
+ 'check_function': check_kentix_temp,
+ 'inventory_function': inventory_kentix_temp,
+ 'service_description': 'Temperature',
+ 'has_perfdata': True,
+ 'snmp_info': ('.1.3.6.1.4.1.37954.3.1.1',
+ ['1', # temperatureValue
+ '2', # temperatureMin
+ '3', # temperatureMax
+ '4', # temperatureAlarm, not used here
+ '5', # temperatureAlarmtext
+ ]
+ ),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.332.11.6"),
+}
Module: check_mk
Branch: master
Commit: 7d8ccb0890a6611345f8a19e5d5098121805a641
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7d8ccb0890a661…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Mar 25 11:34:26 2014 +0100
innovaphone_priports_l1, innovaphone_priports_l2: New Checks for Innovaphone PRI Ports
---
.werks/146 | 8 ++++
ChangeLog | 1 +
checkman/innovaphone_priports_l1 | 14 +++++++
checkman/innovaphone_priports_l2 | 13 +++++++
checks/innovaphone_priports_l1 | 75 ++++++++++++++++++++++++++++++++++++++
checks/innovaphone_priports_l2 | 74 +++++++++++++++++++++++++++++++++++++
6 files changed, 185 insertions(+)
diff --git a/.werks/146 b/.werks/146
new file mode 100644
index 0000000..5624a86
--- /dev/null
+++ b/.werks/146
@@ -0,0 +1,8 @@
+Title: innovaphone_priports_l1, innovaphone_priports_l2: New Checks for Innovaphone PRI Ports
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1395743634
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index f84dfd3..97e8c37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -126,6 +126,7 @@
* 0145 apc_symmetra: Changed naming of Batterie Temperature to System Temerature...
NOTE: Please refer to the migration notes!
* 0735 mem.win: now able to configure swap file levels
+ * 0146 innovaphone_priports_l1, innovaphone_priports_l2: New Checks for Innovaphone PRI Ports
* 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...
diff --git a/checkman/innovaphone_priports_l1 b/checkman/innovaphone_priports_l1
new file mode 100644
index 0000000..daba5e4
--- /dev/null
+++ b/checkman/innovaphone_priports_l1
@@ -0,0 +1,14 @@
+title: Innovaphone Pri L1 Gateways: Pri Ports
+agents: snmp
+catalog: hw/network/tel
+license: GPL
+distribution: check_mk
+description:
+ This check checks the L1 pri ports of a innovaphone pri gateway like IP6010, IP3010 or IP1060.
+ The Check monitors the current state, Signal loss since last check and the slip error count since the
+ last inventory. To reset the slip error count you can eighter do a reinventory or fix the problem and reboot
+ the device.
+
+inventory:
+ One service for each port in state UP will be created.
+
diff --git a/checkman/innovaphone_priports_l2 b/checkman/innovaphone_priports_l2
new file mode 100644
index 0000000..3b92da9
--- /dev/null
+++ b/checkman/innovaphone_priports_l2
@@ -0,0 +1,13 @@
+title: Innovaphone Pri L2 Gateways: Pri Ports
+agents: snmp
+catalog: hw/network/tel
+license: GPL
+distribution: check_mk
+description:
+ This check checks the L2 pri ports of a innovaphone pri gateway like IP6010, IP3010 or IP1060.
+ The Check monitors the current state and the current mode. It will return a {Critical} if the
+ state changes to down, or the mode changes since the last inventory.
+
+inventory:
+ One service for each port in state UP will be created.
+
diff --git a/checks/innovaphone_priports_l1 b/checks/innovaphone_priports_l1
new file mode 100644
index 0000000..a846cce
--- /dev/null
+++ b/checks/innovaphone_priports_l1
@@ -0,0 +1,75 @@
+#!/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_innovaphone_priports_l1(info):
+ inventory = []
+ for line in info:
+ if line[1] != '1':
+ inventory.append((line[0], {'err_slip_count' : saveint(line[3])} ))
+ return inventory
+
+def check_innovaphone_priports_l1(item, params, info):
+ states = {
+ 1 : "Down",
+ 2 : "UP",
+ }
+
+ for line in info:
+ if line[0] == item:
+ state = 0
+ messages = []
+ l1state, l1sigloss, l1slip = map(saveint, line[1:])
+ state_label = ""
+ if l1state == 1:
+ state = 2
+ messages.append("Current State is %s" % states[l1state] )
+ else:
+ messages.append("State is UP")
+
+ timedif, siglos_per_sec = get_counter("innovaphone_priports_l1." + item, time.time(), l1sigloss )
+ if siglos_per_sec > 0:
+ state = 2
+ messages.append("Signal Loss is %.2f in last %.0fsec(!!)" % ( siglos_per_sec, timedif ))
+
+ if l1slip > params.get('err_slip_count', 0):
+ state = 2
+ messages.append("Slip Error Count at " + str(l1slip) )
+ return state, ", ".join(messages)
+ return 3, "Output not found"
+
+check_info["innovaphone_priports_l1"] = {
+ "check_function" : check_innovaphone_priports_l1,
+ "inventory_function" : inventory_innovaphone_priports_l1,
+ "service_description" : "Port L1 %s",
+ "has_perfdata" : False,
+ "snmp_info" : ( ".1.3.6.1.4.1.6666.1.2.1", [ 1, #l1PriLabel
+ 2, #l1PriState
+ 5, #l1PriErrSigLoss
+ 9, #l1PriErrSlip
+ ] ),
+ "snmp_scan_function" : lambda oid: oid('.1.3.6.1.2.1.1.2.0') == ".1.3.6.1.4.1.6666",
+}
+
diff --git a/checks/innovaphone_priports_l2 b/checks/innovaphone_priports_l2
new file mode 100644
index 0000000..d5ecba3
--- /dev/null
+++ b/checks/innovaphone_priports_l2
@@ -0,0 +1,74 @@
+#!/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_innovaphone_priports_l2(info):
+ inventory = []
+ for line in info:
+ if line[1] != '1':
+ inventory.append((line[0], {'mode' : saveint(line[2])} ))
+ return inventory
+
+def check_innovaphone_priports_l2(item, params, info):
+ modes = {
+ 1 : "TE",
+ 2 : "NT",
+ }
+
+ states = {
+ 1 : "Down",
+ 2 : "UP",
+ }
+
+ for line in info:
+ if line[0] == item:
+ state = 0
+ l2state, l2mode = map(saveint, line[1:])
+ state_label = ""
+ if l2state == 1:
+ state = 2
+ state_label = "(!!)"
+
+ mode_label = ""
+ if l2mode != params['mode']:
+ state = 2
+ mode_label = "(!!)"
+
+ return state, "State: %s%s, Mode: %s%s" % \
+ ( states[l2state], state_label, modes[l2mode], mode_label )
+ return 3, "Output not found"
+
+check_info["innovaphone_priports_l2"] = {
+ "check_function" : check_innovaphone_priports_l2,
+ "inventory_function" : inventory_innovaphone_priports_l2,
+ "service_description" : "Port L2 %s",
+ "has_perfdata" : False,
+ "snmp_info" : ( ".1.3.6.1.4.1.6666.1.1.1", [ 1, #l2Label
+ 2, #l2State
+ 3 #l2Mode
+ ] ),
+ "snmp_scan_function" : lambda oid: oid('.1.3.6.1.2.1.1.2.0') == ".1.3.6.1.4.1.6666",
+}
+
Module: check_mk
Branch: master
Commit: b689fde9a7a0b9f9c405024df566b7be05149d0f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b689fde9a7a0b9…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Mar 21 15:17:52 2014 +0100
removed unused var
---
web/htdocs/wato.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 97cac3e..f27ac12 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -13146,7 +13146,6 @@ def rule_matches_host_and_item(rulespec, tag_specs, host_list, item_list,
if not hostname_match:
reasons.append(_("The host name does not match."))
- tags_match = True
for tag in tag_specs:
if tag[0] != '/' and tag[0] != '!' and tag not in host[".tags"]:
reasons.append(_("The host is missing the tag %s" % tag))