Module: check_mk
Branch: master
Commit: 1d01ea40aed9024ddbb0079ef460fe9478e22291
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d01ea40aed902…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Jun 26 20:55:47 2012 +0200
Added simple apc powerswitch check, no config yet
---
checks/apc_powerswitch | 50 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/checks/apc_powerswitch b/checks/apc_powerswitch
new file mode 100644
index 0000000..c5298d3
--- /dev/null
+++ b/checks/apc_powerswitch
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2012 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_apc_powerswitch(info):
+ return [(x[0],saveint(line[2])) for x in info]
+
+def check_apc_powerswitch(item, params, info):
+ state = {
+ 1 : 'on',
+ 2 : 'off',
+ }
+ for line in info:
+ if line[0] == item:
+ return(0, 'OK - Port %s has status %s' % (line[1], state[saveint(line[2])]))
+
+ return False
+
+
+
+check_info['apc_powerswitch'] = {
+ 'check_function' : check_apc_powerswitch,
+ 'inventory_function' : inventory_apc_powerswitch,
+ 'snmp_scan_function' : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.318.1.3.4.5"),
+ 'service_description' : 'Power Outlet Port %s',
+ 'snmp_info' : ( '.1.3.6.1.4.1.318.1.1.12.3.5.1.1', [1, 2, 4] ),
+}
Module: check_mk
Branch: master
Commit: 3dd823a882211a262743f0fb5664e57f1ffbb43b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3dd823a882211a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jun 26 17:55:06 2012 +0200
Updated bug entries #0779
---
.bugs/779 | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/.bugs/779 b/.bugs/779
new file mode 100644
index 0000000..e6dd858
--- /dev/null
+++ b/.bugs/779
@@ -0,0 +1,9 @@
+Title: BI cannot assume UP host state
+Component: bi
+State: open
+Date: 2012-06-26 17:54:41
+Targetversion: 1.2.0
+Class: bug
+
+You can assume OK as service state but not UP
+as host state (just DOWN and UNREACH).