Module: check_mk
Branch: master
Commit: c92e4fd7b267c552db39eef0cc8b68b5e625d67e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c92e4fd7b267c5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jul 20 16:18:22 2012 +0200
vms_if: new check for network interfaces on OpenVMS
---
ChangeLog | 1 +
checkman/vms_if | 12 ++++++
checks/vms_if | 74 ++++++++++++++++++++++++++++++++++++
pnp-templates/check_mk-vms_if.php | 1 +
web/plugins/perfometer/check_mk.py | 1 +
5 files changed, 89 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 896a24e..0c6cf05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@
come shortly after)
* vms_users: new check for number of interactive sessions on OpenVMS
* vms_cpu: new check for CPU utilization on OpenVMS
+ * vms_if: new check for network interfaces on OpenVMS
WATO:
* Added permission to control the "clone host" feature in WATO
diff --git a/checkman/vms_if b/checkman/vms_if
new file mode 100644
index 0000000..8fbe109
--- /dev/null
+++ b/checkman/vms_if
@@ -0,0 +1,12 @@
+title: Monitor traffic of network interfaces on OpenVMS
+agents: openvms
+author: Mathias Kettner <mk(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the ingoing and outgoing traffic of networking
+ interfaces on OpenVMS. Levels can be set on the used bandwidth and
+ on the error rate.
+
+ This check is compatible to {if}. Please refer to that man page for
+ further details about check configuration.
diff --git a/checks/vms_if b/checks/vms_if
new file mode 100644
index 0000000..e18e236
--- /dev/null
+++ b/checks/vms_if
@@ -0,0 +1,74 @@
+#!/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 convert_vms_if(info):
+ new_info = []
+ ifIndex = 0
+ for line in info:
+ ifDescr, ifInOctets, ifInErrors, ifOutOctets, ifOutErrors, ifInDiscards =
line[:6]
+ ifIndex += 1
+ new_info.append((
+ str(ifIndex),
+ ifDescr,
+ '6', # ifType = Ethernet
+ '1000000000',# ifHighSpeed
+ '1', # ifOperStatus
+ ifInOctets,
+ '0', # ifHCInUcastPkts
+ '0', # ifHCInMulticastPkts
+ '0', # ifHCInBroadcastPkts
+ ifInDiscards,
+ ifInErrors,
+ ifOutOctets,
+ '0', # ifHCOutUcastPkts
+ '0', # ifHCOutMulticastPkts
+ '0', # ifHCOutBroadcastPkts
+ '0', # ifOutDiscards
+ ifOutErrors,
+ '0', # ifOutQLen
+ ifDescr,
+ '', # ifPhysAddress
+ ))
+ return new_info
+
+
+def inventory_vms_if(info):
+ return inventory_if_common(convert_vms_if(info))
+
+def check_vms_if(item, params, info):
+ return check_if_common(item, params, convert_vms_if(info))
+
+
+check_info['vms_if'] = {
+ "check_function" : check_vms_if,
+ "inventory_function" : inventory_vms_if,
+ "service_description" : "Interface %s",
+ "has_perfdata" : True,
+ "includes" : [ "if.include" ],
+ "group" : "if",
+ "default_levels_variable" : "if_default_levels",
+}
+
diff --git a/pnp-templates/check_mk-vms_if.php b/pnp-templates/check_mk-vms_if.php
new file mode 120000
index 0000000..9a34dce
--- /dev/null
+++ b/pnp-templates/check_mk-vms_if.php
@@ -0,0 +1 @@
+check_mk-if.php
\ No newline at end of file
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 1faf690..8bdd0f1 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -266,6 +266,7 @@ def perfometer_check_mk_brocade_fcport(row, check_command,
perf_data):
perfometers["check_mk-if"] = perfometer_check_mk_if
perfometers["check_mk-if64"] = perfometer_check_mk_if
+perfometers["check_mk-vms_if"] = perfometer_check_mk_if
perfometers["check_mk-if_lancom"] = perfometer_check_mk_if
perfometers["check_mk-lnx_if"] = perfometer_check_mk_if
perfometers["check_mk-hpux_if"] = perfometer_check_mk_if