Module: check_mk
Branch: master
Commit: 92eaa76066f0ba1122cb72f4f1f783d8c0439378
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=92eaa76066f0ba…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Wed Jan 21 14:31:14 2015 +0100
#1855 esx_systeminfo: new inventory check to retrieve info about the host operating system
for ESX servers
---
.werks/1855 | 9 ++++++++
ChangeLog | 3 ++-
inventory/esx_systeminfo | 57 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/.werks/1855 b/.werks/1855
new file mode 100644
index 0000000..b633755
--- /dev/null
+++ b/.werks/1855
@@ -0,0 +1,9 @@
+Title: esx_systeminfo: new inventory check to retrieve info about the host operating
system for ESX servers
+Level: 1
+Component: inv
+Compatible: compat
+Version: 1.2.7i1
+Date: 1421846988
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 3328700..58b428d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,8 +48,8 @@
NOTE: Please refer to the migration notes!
* 1525 viprinet_temp: Now uses new Temperature WATO rule...
NOTE: Please refer to the migration notes!
- * 1854 netscaler_tcp_conns: new check to monitor tcp connections on Citrix Netscaler
Loadbalancer Appliances
* 1673 netapp_volumes: now able to configure levels by magic factor
+ * 1854 netscaler_tcp_conns: new check to monitor tcp connections on Citrix Netscaler
Loadbalancer Appliances
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
@@ -160,6 +160,7 @@
HW/SW-Inventory:
* 1846 Keep track of changes of software and hardware...
+ * 1855 esx_systeminfo: new inventory check to retrieve info about the host operating
system for ESX servers
* 1851 FIX: win_exefiles: inventory check can now handle time stamps in us english
locale
diff --git a/inventory/esx_systeminfo b/inventory/esx_systeminfo
new file mode 100644
index 0000000..79b66f4
--- /dev/null
+++ b/inventory/esx_systeminfo
@@ -0,0 +1,57 @@
+#!/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:
+# <<<esx_systeminfo>>>
+# vendor VMware, Inc.
+# name VMware ESXi
+# propertyCollector ha-property-collector
+# apiVersion 5.0
+# sessionManager ha-sessionmgr
+# osType vmnix-x86
+# version 5.0.0
+# build 914586
+# licenseManager ha-license-manager
+# perfManager ha-perfmgr
+# rootFolder ha-folder-root
+
+
+def inv_esx_systeminfo(info):
+ node = inv_tree("software.os.")
+ for line in info:
+ if line[0] == 'vendor':
+ node["vendor"] = " ".join(line[1:])
+ elif line[0] == 'name':
+ node["name"] = " ".join(line[1:])
+ elif line[0] == 'version':
+ node["version"] = " ".join(line[1:])
+ elif line[0] == 'osType':
+ node["type"] = " ".join(line[1:])
+ node["arch"] = "x86_64"
+
+inv_info['esx_systeminfo'] = {
+ "inv_function" : inv_esx_systeminfo,
+}