Module: check_mk
Branch: master
Commit: 61c0c54f30ef0527d86849b76bc81d4de250a893
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=61c0c54f30ef05…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Dec 2 14:52:51 2014 +0100
agent_vsphere: now reports additional hostsystem information.
This info will be evaluated later on by inventory checks.
---
agents/special/agent_vsphere | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index fd0e780..509bd35 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -171,6 +171,8 @@ telegram_list = {
'<ns1:pathSet>hardware.cpuInfo.numCpuCores</ns1:pathSet>'\
'<ns1:pathSet>config.multipathState.path</ns1:pathSet>'\
'<ns1:pathSet>hardware.systemInfo.model</ns1:pathSet>'\
+ '<ns1:pathSet>hardware.systemInfo.uuid</ns1:pathSet>'\
+
'<ns1:pathSet>hardware.systemInfo.otherIdentifyingInfo</ns1:pathSet>'\
'<ns1:pathSet>hardware.systemInfo.vendor</ns1:pathSet>'\
'<ns1:pathSet>name</ns1:pathSet>'\
'<ns1:pathSet>overallStatus</ns1:pathSet>'\
@@ -858,11 +860,24 @@ if not error:
def eval_pci_device(pci_propset):
eval_propset_block( [ "id", "vendorName",
"deviceName" ], "id", pci_propset)
+ def eval_systeminfo_other(otherinfo_propset):
+ data =
get_pattern("<identifierValue>(.*?)</identifierValue>.*?<key>(.*?)</key>",
otherinfo_propset)
+ keys_index = {}
+
+ for value, key in data:
+ idx = 0
+ if key in keys_index:
+ keys_index[key] = keys_index[key] + 1
+ idx = keys_index[key]
+
hostsystems_properties[hostname]["hardware.systemInfo.otherIdentifyingInfo.%s.%d"
% (key, idx)] = [ value ]
+ keys_index[key] = idx
+
eval_functions = {
"config.multipathState.path"
: eval_multipath_state,
"runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo":
eval_sensor_info,
"hardware.cpuPkg"
: eval_cpu_pkg,
"hardware.pciDevice"
: eval_pci_device,
+ "hardware.systemInfo.otherIdentifyingInfo"
: eval_systeminfo_other,
}
elements =
get_pattern('<propSet><name>(.*?)</name><val.*?>(.*?)</val></propSet>',
entry)