Module: check_mk
Branch: master
Commit: adc5648d83b60957ecf8d781928d516b18968e9d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=adc5648d83b609…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jul 11 15:37:43 2013 +0200
vmware_state: removed ancient, now orphaned check.
---
ChangeLog | 1 +
checks/vmware_state | 110 ---------------------------------------------------
2 files changed, 1 insertion(+), 110 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 09ad775..526663b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,6 +52,7 @@
* fc_brocade_port: removed obsolete check
* fc_brocade_port_detailed: removed obsolete check
* tsm_stgpool: removed orphaned check
+ * vmware_state: removed ancient, now orphaned check. Use vsphere_agent instead.
* FIX: esx_vsphere_datastores: Fix incomplete performance data and Perf-O-Meter
* FIX: cleaned up fileinfo.groups pattern handling, manual configuration
is now possible using WATO
diff --git a/checks/vmware_state b/checks/vmware_state
deleted file mode 100644
index 815e189..0000000
--- a/checks/vmware_state
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/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.
-
-# THIS CHECK IS DEPRACATED! Use agent_vpshere instead.
-
-# Example output from agent:
-# <<<vmware_state>>>
-# [2009-11-12 10:40:30.086 'App' 3076453184 info] Current working directory:
/usr/lib/check_mk_agent/plugins
-# Found VM:
-# moref:32
-# name:name_of_vm
-# uuid:xxxxxxxxxxxx
-# ipaddr:192.168.1.5
-# Found VM:
-# moref:48
-# name:abcdef
-# uuid:xxxxxxxxx
-# ipaddr:12.34.56.78
-# [2009-11-12 10:40:30.215 'vcbVmName' 3076453184 warning] IP address not set.
-# Found VM:
-# moref:80
-# name:name_of_vm
-# uuid:xxxxxxxxx
-# ipaddr:
-
-def inventory_vmware_state(info):
- inventory = []
- for line in info:
- if line[0].startswith("name:"):
- vm_name = line[0][5:]
- if line[0].startswith("ipaddr:"):
- vm_ipaddr = line[0][7:]
- # add machine to inventory (if IP address is not empty)
- if vm_ipaddr != '':
- inventory.append((vm_name, None))
- return inventory
-
-# 1. Variant: loop over all machines and
-# remember the ip addresses of all machines.
-# Then pick out the ip address of the machine
-# we are looking for.
-#
-#def check_vmware_state(item, params, info):
-# vm_ipaddr = {}
-# for line in info:
-# if line[0].startswith("name:"):
-# vm_name = line[0][5:]
-#
-# if line[0].startswith("ipaddr:"):
-# vm_ipaddr[vm_name] = line[0][7:]
-#
-# ip_addr = vm_ipaddr.get(item)
-# if ip_addr == "":
-# return(2, "The Machine is DOWN")
-#
-# elif ip_addr == None:
-# return (3, "no such machine")
-#
-# else:
-# return(0, "The Machine is UP (%s)" % ip_addr)
-
-# 2. Variant: loop over all machines. If
-# we reach the machine we are looking for
-# we do the check and return immediately.
-# If we go through the loop without finding
-# the machine, we return an UNKNOWN state.
-def check_vmware_state(item, _no_params, info):
- # item is the name of the machine.
- for line in info:
- if line[0].startswith("name:"):
- vm_name = line[0][5:]
- elif line[0].startswith("ipaddr:"):
- if vm_name == item:
- ip_addr = line[0][7:]
- if ip_addr == "":
- return (2, "the machine is down")
- else:
- return (0, "machine is up (%s)" % ip_addr)
- return (3, "no such machine")
-
-
-check_info["vmware_state"] = {
- 'check_function': check_vmware_state,
- 'inventory_function': inventory_vmware_state,
- 'service_description': 'VM %s',
- 'group': 'vm_state',
-}