Module: check_mk
Branch: master
Commit: f444e5291713463fb7da4fb96b2f7ef5583be44f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f444e529171346…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Mar 28 11:31:31 2014 +0100
ibm_svc_system: new check for System Info of IBM SVC / V7000 devices
---
.werks/773 | 8 +++
ChangeLog | 1 +
checkman/ibm_svc_system | 12 ++++
checks/ibm_svc_system | 116 +++++++++++++++++++++++++++++++
web/plugins/wato/datasource_programs.py | 5 +-
5 files changed, 140 insertions(+), 2 deletions(-)
diff --git a/.werks/773 b/.werks/773
new file mode 100644
index 0000000..583c2a7
--- /dev/null
+++ b/.werks/773
@@ -0,0 +1,8 @@
+Title: ibm_svc_system: new check for System Info of IBM SVC / V7000 devices
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1396002652
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 7aada6d..2f3460a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -136,6 +136,7 @@
* 0770 innovaphone_licenses: New check to monitor licenses on innovaphone
devices"
* 0771 juniper_trpz_aps: Show the number of connected access points on juniper wlan
controllers
* 0772 added special agent for IBM SVC / V7000 storage systems...
+ * 0773 ibm_svc_system: new check for System Info of IBM SVC / V7000 devices
* 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/ibm_svc_system b/checkman/ibm_svc_system
new file mode 100644
index 0000000..7b6d62b
--- /dev/null
+++ b/checkman/ibm_svc_system
@@ -0,0 +1,12 @@
+title: IBM SVC / V7000: System Info
+agents: ibm_svc
+catalog: hw/storagehw/ibm
+license: GPL
+distribution: check_mk
+description:
+ Reports name, location, code_level and email_contact_location of an
+ IBM SVC / V7000 device. The check always returns {OK}.
+
+inventory:
+ Creates exactly one check for every IBM SVC / V7000 named
+ IBM SVC Info.
diff --git a/checks/ibm_svc_system b/checks/ibm_svc_system
new file mode 100644
index 0000000..506225b
--- /dev/null
+++ b/checks/ibm_svc_system
@@ -0,0 +1,116 @@
+#!/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.
+
+# Example output from agent:
+# <<<ibm_svc_system:sep(58)>>>
+# id:0000020060C16104
+# name:BLUBB_NAME
+# location:local
+# partnership:
+# bandwidth:
+# total_mdisk_capacity:192.9TB
+# space_in_mdisk_grps:192.9TB
+# space_allocated_to_vdisks:147.48TB
+# total_free_space:45.5TB
+# total_vdiskcopy_capacity:149.54TB
+# total_used_capacity:147.44TB
+# total_overallocation:77
+# total_vdisk_capacity:74.77TB
+# total_allocated_extent_capacity:147.49TB
+# statistics_status:on
+# statistics_frequency:5
+# cluster_locale:en_US
+# time_zone:384 Europe/Paris
+# code_level:6.4.1.4 (build 75.3.1303080000)
+# console_IP:x.x.x.x:443
+# id_alias:0000020060C16104
+# gm_link_tolerance:300
+# gm_inter_cluster_delay_simulation:0
+# gm_intra_cluster_delay_simulation:0
+# gm_max_host_delay:5
+# email_reply:master@desaster
+# email_contact:Wichtiger Admin
+# email_contact_primary:+49 30 555555555
+# email_contact_alternate:
+# email_contact_location:blubb
+# email_contact2:
+# email_contact2_primary:
+# email_contact2_alternate:
+# email_state:running
+# inventory_mail_interval:7
+# cluster_ntp_IP_address:x.x.x.x
+# cluster_isns_IP_address:
+# iscsi_auth_method:none
+# iscsi_chap_secret:
+# auth_service_configured:no
+# auth_service_enabled:no
+# auth_service_url:
+# auth_service_user_name:
+# auth_service_pwd_set:no
+# auth_service_cert_set:no
+# auth_service_type:tip
+# relationship_bandwidth_limit:25
+# tier:generic_ssd
+# tier_capacity:0.00MB
+# tier_free_capacity:0.00MB
+# tier:generic_hdd
+# tier_capacity:192.94TB
+# tier_free_capacity:45.46TB
+# has_nas_key:no
+# layer:replication
+# rc_buffer_size:48
+# compression_active:no
+# compression_virtual_capacity:0.00MB
+# compression_compressed_capacity:0.00MB
+# compression_uncompressed_capacity:0.00MB
+# cache_prefetch:on
+# email_organization:Acme Inc
+# email_machine_address:
+# email_machine_city:Berlin
+# email_machine_state:XX
+# email_machine_zip:
+# email_machine_country:DE
+# total_drive_raw_capacity:0
+
+def inventory_ibm_svc_system(info):
+ return [(None, None)]
+
+def check_ibm_svc_system(item, _no_params, info):
+ message = ""
+ for line in info:
+ if line[0] in ("name", "location", "code_level",
"email_contact_location"):
+ if message != "":
+ message += ", "
+ message += "%s: %s" % (line[0], line[1])
+ return 0, message
+
+check_info["ibm_svc_system"] = {
+ "check_function" : check_ibm_svc_system,
+ "inventory_function" : inventory_ibm_svc_system,
+ "service_description" : "IBM SVC Info",
+ "has_perfdata" : False,
+}
+
diff --git a/web/plugins/wato/datasource_programs.py
b/web/plugins/wato/datasource_programs.py
index e5dfc59..2c59442 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -271,12 +271,13 @@ register_rule(group,
( "lsmdiskgrp", _("MDisksGrps") ),
( "lsnode", _("IO Groups") ),
# ( "lsnodestats", _("Node Stats") ),
-# ( "lssystem", _("System") ),
+ ( "lssystem", _("System Info") ),
# ( "lssystemstats", _("System Stats") ),
],
# default_value = [ "lshost", "lslicense",
"lsmdisk", "lsmdiskgrp", "lsnode",
# "lsnodestats", "lssystem",
"lssystemstats", ],
- default_value = [ "lshost", "lslicense",
"lsmdisk", "lsmdiskgrp", "lsnode", ],
+ default_value = [ "lshost", "lslicense",
"lsmdisk", "lsmdiskgrp", "lsnode",
+ "lssystem", ],
allow_empty = False,
),
title = _("Retrieve information about..."),