From ec30ac40b00ba65f5ec650e4494b88704c65ca41 Mon Sep 17 00:00:00 2001 From: Mattikin Date: Fri, 27 Mar 2015 23:30:57 -0400 Subject: [PATCH] Added performance metrics for ESXi Host, added thresholds for CPU and Memory usage --- .../VMwareESXiMonitor/ESXiDatastore.py | 18 +- .../community/VMwareESXiMonitor/ESXiVM.py | 12 +- .../datasources/VMwareDataSource.py | 3 +- .../VMwareESXiMonitor/libexec/esxi_monitor.pl | 43 +- .../VMwareESXiMonitor/objects/objects.xml | 729 ++++++++++++++---- .../VMwareESXiMonitor/parsers/__init__.py | 0 .../VMwareESXiMonitor/parsers/vmware.py | 58 -- setup.py | 2 +- 8 files changed, 599 insertions(+), 266 deletions(-) delete mode 100644 ZenPacks/community/VMwareESXiMonitor/parsers/__init__.py delete mode 100644 ZenPacks/community/VMwareESXiMonitor/parsers/vmware.py diff --git a/ZenPacks/community/VMwareESXiMonitor/ESXiDatastore.py b/ZenPacks/community/VMwareESXiMonitor/ESXiDatastore.py index 38b4e04..4ffc338 100644 --- a/ZenPacks/community/VMwareESXiMonitor/ESXiDatastore.py +++ b/ZenPacks/community/VMwareESXiMonitor/ESXiDatastore.py @@ -39,22 +39,22 @@ def device(self): def usedSpace(self): capacity = self.capacity free = self.freeSpace() - if capacity is not None and free is not None: - return capacity - free - return None + if capacity is None or free is None: + return None + return capacity - free def freeSpace(self): free = self.cacheRRDValue('diskFreeSpace') - if free is not None and not isnan(free): - return long(free) - return None + if free is None or isnan(free): + return None + return long(free) def usedPercent(self): capacity = self.capacity used = self.usedSpace() - if capacity is not None and used is not None: - return round(100.0 * used / capacity) - return 'Unknown' + if capacity is None or used is None: + return 'Unknown' + return round(100.0 * used / capacity) InitializeClass(ESXiDatastore) diff --git a/ZenPacks/community/VMwareESXiMonitor/ESXiVM.py b/ZenPacks/community/VMwareESXiMonitor/ESXiVM.py index 551f43f..366fe97 100644 --- a/ZenPacks/community/VMwareESXiMonitor/ESXiVM.py +++ b/ZenPacks/community/VMwareESXiMonitor/ESXiVM.py @@ -40,15 +40,15 @@ def device(self): def adminStatus(self): status = self.cacheRRDValue('adminStatus') - if status is not None and not isnan(status): - return int(status) - return None + if status is None or isnan(status): + return None + return int(status) def operStatus(self): status = self.cacheRRDValue('operStatus') - if status is not None and not isnan(status): - return int(status) - return None + if status is None or isnan(status): + return None + return int(status) InitializeClass(ESXiVM) diff --git a/ZenPacks/community/VMwareESXiMonitor/datasources/VMwareDataSource.py b/ZenPacks/community/VMwareESXiMonitor/datasources/VMwareDataSource.py index 92aca0e..76c3bda 100644 --- a/ZenPacks/community/VMwareESXiMonitor/datasources/VMwareDataSource.py +++ b/ZenPacks/community/VMwareESXiMonitor/datasources/VMwareDataSource.py @@ -28,7 +28,6 @@ class VMwareDataSource(ZenPackPersistence, RRDDataSource.SimpleRRDDataSource): sourcetype = 'VMware' eventClass = Cmd_Fail - parser = 'ZenPacks.community.VMwareESXiMonitor.parsers.vmware' performanceSource = '' instance = '' @@ -70,7 +69,7 @@ def useZenCommand(self): def addDataPoints(self): datastore = ['diskFreeSpace','connectionStatus'] guest = ['memUsage','memOverhead','memConsumed','diskUsage','cpuUsageMin','cpuUsageMax','cpuUsageAvg','cpuUsage','adminStatus','operStatus'] - host = ['sysUpTime','memSwapused','memGranted','memActive','diskUsage','cpuUsagemhz','cpuUsage','cpuReservedcapacity','netReceived','netTransmitted','netPacketsRx','netPacketsTx','netDroppedRx','netDroppedTx'] + host = ['sysUpTime','memUsage','memSwapused','memGranted','memActive','diskUsage','cpuUsageMin','cpuUsageMax','cpuUsageAvg','cpuUsage','cpuReservedcapacity','netReceived','netTransmitted','netPacketsRx','netPacketsTx','netDroppedRx','netDroppedTx'] if self.id == "VMwareDatastore": self.performanceSource = "VMwareDatastore" diff --git a/ZenPacks/community/VMwareESXiMonitor/libexec/esxi_monitor.pl b/ZenPacks/community/VMwareESXiMonitor/libexec/esxi_monitor.pl index 6a48c1f..e16d7bf 100644 --- a/ZenPacks/community/VMwareESXiMonitor/libexec/esxi_monitor.pl +++ b/ZenPacks/community/VMwareESXiMonitor/libexec/esxi_monitor.pl @@ -66,14 +66,14 @@ } else { my $perfmgr_view = Vim::get_view(mo_ref => Vim::get_service_content()->perfManager, properties => [ 'perfCounter' ]); - my $memUsage = get_info($vm_view, $perfmgr_view, 'mem', 'usage', 'minimum'); - my $memOverhead = get_info($vm_view, $perfmgr_view, 'mem', 'overhead', 'minimum'); - my $memConsumed = get_info($vm_view, $perfmgr_view, 'mem', 'consumed', 'minimum'); - my $diskUsage = get_info($vm_view, $perfmgr_view, 'disk', 'usage', 'average'); - my $cpuUsageMin = get_info($vm_view, $perfmgr_view, 'cpu', 'usage', 'minimum'); - my $cpuUsageMax = get_info($vm_view, $perfmgr_view, 'cpu', 'usage', 'maximum'); - my $cpuUsageAvg = get_info($vm_view, $perfmgr_view, 'cpu', 'usage', 'average'); - my $cpuUsage = get_info($vm_view, $perfmgr_view, 'cpu', 'usagemhz', 'average'); + my $memUsage = get_info($vm_view, $perfmgr_view, 'mem', 'usage', 'minimum') / 100; + my $memOverhead = get_info($vm_view, $perfmgr_view, 'mem', 'overhead', 'minimum') * 1024; + my $memConsumed = get_info($vm_view, $perfmgr_view, 'mem', 'consumed', 'minimum') * 1024; + my $diskUsage = get_info($vm_view, $perfmgr_view, 'disk', 'usage', 'average') * 1024; + my $cpuUsageMin = get_info($vm_view, $perfmgr_view, 'cpu', 'usage', 'minimum') / 100; + my $cpuUsageMax = get_info($vm_view, $perfmgr_view, 'cpu', 'usage', 'maximum') / 100; + my $cpuUsageAvg = get_info($vm_view, $perfmgr_view, 'cpu', 'usage', 'average') / 100; + my $cpuUsage = get_info($vm_view, $perfmgr_view, 'cpu', 'usagemhz', 'average') * 1000000; my $overallStatus = $$vm_view[0]->get_property('summary.overallStatus')->val; my $operStatus = 0; @@ -99,26 +99,29 @@ die "Runtime error\n" if (!defined($host_view)); die "Host \"" . $$host_name{"name"} . "\" does not exist\n" if (!@$host_view); if (uc($$host_view[0]->get_property('runtime.inMaintenanceMode')) eq "TRUE") { - print "hostperf|sysUpTime= memSwapused= memGranted= memActive= diskUsage= cpuUsagemhz= cpuUsage= cpuReservedcapacity= netReceived= netTransmitted= netPacketsRx= netPacketsTx= netDroppedRx= netDroppedTx=\n"; + print "hostperf|sysUpTime= memUsage= memSwapused= memGranted= memActive= diskUsage= cpuUsageMin= cpuUsageMax= cpuUsageAvg= cpuUsage= cpuReservedcapacity= netReceived= netTransmitted= netPacketsRx= netPacketsTx= netDroppedRx= netDroppedTx=\n"; } else { my $perfmgr_view = Vim::get_view(mo_ref => Vim::get_service_content()->perfManager, properties => [ 'perfCounter' ]); my $sysUpTime = get_info($host_view, $perfmgr_view, 'sys', 'uptime', 'latest') * 100; - my $memSwapused = get_info($host_view, $perfmgr_view, 'mem', 'swapused', 'maximum'); - my $memGranted = get_info($host_view, $perfmgr_view, 'mem', 'granted', 'maximum'); - my $memActive = get_info($host_view, $perfmgr_view, 'mem', 'active', 'maximum'); - my $diskUsage = get_info($host_view, $perfmgr_view, 'disk', 'usage', 'average'); - my $cpuUsagemhz = get_info($host_view, $perfmgr_view, 'cpu', 'usagemhz', 'average'); - my $cpuUsage = get_info($host_view, $perfmgr_view, 'cpu', 'usage', 'average'); - my $cpuReservedcapacity = get_info($host_view, $perfmgr_view, 'cpu', 'reservedCapacity', 'average'); - my $netReceived = get_info($host_view, $perfmgr_view, 'net', 'received', 'average'); - my $netTransmitted = get_info($host_view, $perfmgr_view, 'net', 'transmitted', 'average'); + my $memUsage = get_info($host_view, $perfmgr_view, 'mem', 'usage', 'minimum') / 100; + my $memSwapused = get_info($host_view, $perfmgr_view, 'mem', 'swapused', 'maximum') * 1024; + my $memGranted = get_info($host_view, $perfmgr_view, 'mem', 'granted', 'maximum') * 1024; + my $memActive = get_info($host_view, $perfmgr_view, 'mem', 'active', 'maximum') * 1024; + my $diskUsage = get_info($host_view, $perfmgr_view, 'disk', 'usage', 'average') * 1024; + my $cpuUsageMin = get_info($host_view, $perfmgr_view, 'cpu', 'usage', 'minimum') / 100; + my $cpuUsageMax = get_info($host_view, $perfmgr_view, 'cpu', 'usage', 'maximum') / 100; + my $cpuUsageAvg = get_info($host_view, $perfmgr_view, 'cpu', 'usage', 'average') / 100; + my $cpuUsage = get_info($host_view, $perfmgr_view, 'cpu', 'usagemhz', 'average') * 1000000; + my $cpuReservedcapacity = get_info($host_view, $perfmgr_view, 'cpu', 'reservedCapacity', 'average') * 1000000; + my $netReceived = get_info($host_view, $perfmgr_view, 'net', 'received', 'average') * 8192; + my $netTransmitted = get_info($host_view, $perfmgr_view, 'net', 'transmitted', 'average') * 8192; my $netPacketsRx = get_info($host_view, $perfmgr_view, 'net', 'packetsRx', 'summation'); my $netPacketsTx = get_info($host_view, $perfmgr_view, 'net', 'packetsTx', 'summation'); my $netDroppedRx = get_info($host_view, $perfmgr_view, 'net', 'droppedRx', 'summation'); my $netDroppedTx = get_info($host_view, $perfmgr_view, 'net', 'droppedTx', 'summation'); - print "hostperf|sysUpTime=".$sysUpTime." memSwapused=".$memSwapused." memGranted=".$memGranted." memActive=".$memActive." diskUsage=".$diskUsage." cpuUsagemhz=".$cpuUsagemhz." cpuUsage=".$cpuUsage." cpuReservedcapacity=".$cpuReservedcapacity." netReceived=".$netReceived." netTransmitted=".$netTransmitted." netPacketsRx=".$netPacketsRx." netPacketsTx=".$netPacketsTx." netDroppedRx=".$netDroppedRx." netDroppedTx=".$netDroppedTx."\n"; + print "hostperf|sysUpTime=".$sysUpTime." memUsage=".$memUsage." memSwapused=".$memSwapused." memGranted=".$memGranted." memActive=".$memActive." diskUsage=".$diskUsage." cpuUsageMin=".$cpuUsageMin." cpuUsageMax=".$cpuUsageMax." cpuUsageAvg=".$cpuUsageAvg." cpuUsage=".$cpuUsage." cpuReservedcapacity=".$cpuReservedcapacity." netReceived=".$netReceived." netTransmitted=".$netTransmitted." netPacketsRx=".$netPacketsRx." netPacketsTx=".$netPacketsTx." netDroppedRx=".$netDroppedRx." netDroppedTx=".$netDroppedTx."\n"; } } }; @@ -183,7 +186,7 @@ sub get_info { my $values; $values = get_performance_values($views, $perfmgr_view, $group_type, ($counter.".".$rollup_type)); - if (defined($values)) { + if (defined($values) && exists $$values[0][0]->{value}) { my ( $t ) = split(/,/, $$values[0][0]->value); return $t; } diff --git a/ZenPacks/community/VMwareESXiMonitor/objects/objects.xml b/ZenPacks/community/VMwareESXiMonitor/objects/objects.xml index c76f4b4..e57eeeb 100644 --- a/ZenPacks/community/VMwareESXiMonitor/objects/objects.xml +++ b/ZenPacks/community/VMwareESXiMonitor/objects/objects.xml @@ -24,7 +24,7 @@ True -Products.ZenModel.Device +ZenPacks.community.VMwareESXiMonitor.ESXiDatastore @@ -126,7 +126,7 @@ here.capacity * .1 500 -percentage +percent False @@ -196,7 +196,7 @@ ${graphPoint/id} -Products.ZenModel.Device +ZenPacks.community.VMwareESXiMonitor.ESXiHost @@ -235,7 +235,23 @@ GAUGE True - + + +GAUGE + + +True + + + + +GAUGE + + +True + + + GAUGE @@ -275,6 +291,14 @@ GAUGE True + + +GAUGE + + +True + + GAUGE @@ -334,6 +358,114 @@ True + + + +/Perf/CPU + + +5 + + +['VMwareHost_cpuUsageMin', 'VMwareHost_cpuUsageMax'] + + +True + + +90 + + +0 + + + + +/Perf/CPU + + +3 + + +['VMwareHost_cpuUsageMin', 'VMwareHost_cpuUsageMax'] + + +True + + +90 + + +80 + + +0 + + + + +/Perf/Interface + + +3 + + +['VMwareHost_netDroppedRx', 'VMwareHost_netDroppedTx'] + + +True + + +10 + + +0 + + + + +/Perf/Memory + + +5 + + +['VMwareHost_memUsage'] + + +True + + +90 + + +0 + + + + +/Perf/Memory + + +3 + + +['VMwareHost_memUsage'] + + +True + + +90 + + +80 + + +0 + + + @@ -343,7 +475,7 @@ True 500 -percentage +percent False @@ -364,10 +496,32 @@ True 1 - + 0 + +CPU Critical + + +Critical Threshold + + + + +1 + + +CPU Warning + + +Warning Threshold + + + + +4 + AREA @@ -381,16 +535,71 @@ False %5.2lf%% -${graphPoint/id} +CPU Usage (Average) -1 - -100,/ + +VMwareHost_cpuUsageAvg + + +AVERAGE + + + + +3 + + +AREA + + +1 + + +False + + +%5.2lf%% + + +CPU Usage (Max) + + +-1 -VMwareHost_cpuUsage +VMwareHost_cpuUsageMax + + +AVERAGE + + + + +2 + + +AREA + + +1 + + +False + + +%5.2lf%% + + +CPU Usage (Min) + + +-1 + + +VMwareHost_cpuUsageMin AVERAGE @@ -406,7 +615,7 @@ AVERAGE 500 -Bps +bytes/sec False @@ -424,10 +633,10 @@ True True -3 +4 - + 0 @@ -444,14 +653,11 @@ False %5.2lf%s -${graphPoint/id} +Disk Usage -1 - -1024,* - VMwareHost_diskUsage @@ -487,13 +693,24 @@ False True -7 +8 - + 0 + +High Number of dropped Packets + + +Warning Threshold + + + + +1 + AREA @@ -521,7 +738,7 @@ AVERAGE -1 +2 LINE @@ -550,7 +767,7 @@ AVERAGE - + 100 @@ -558,31 +775,53 @@ AVERAGE 500 -B +percent False -True +False --1 +0 --1 +100 True -2 +3 - + + +0 + + +Memory Critical + + +Critical Threshold + + + 1 + +Memory Warning + + +Warning Threshold + + + + +2 + AREA @@ -593,25 +832,53 @@ AREA False -%5.2lf%s +%5.2lf%% -${graphPoint/id} +Memory Usage -1 - -1024,* - -VMwareHost_memActive +VMwareHost_memUsage AVERAGE - + + + + +100 + + +500 + + +packets/sec + + +False + + +False + + +0 + + +-1 + + +True + + +7 + + + 0 @@ -628,16 +895,42 @@ False %5.2lf%s -${graphPoint/id} +Inbound -1 - -1024,* + +VMwareHost_netPacketsRx + + +AVERAGE + + + + +1 + + +LINE + + +1 + + +False + + +%5.2lf%s + + +Outbound + + +-1 -VMwareHost_memGranted +VMwareHost_netPacketsTx AVERAGE @@ -645,7 +938,7 @@ AVERAGE - + 100 @@ -653,7 +946,7 @@ AVERAGE 500 -packets/sec +Hz False @@ -662,7 +955,7 @@ False False -0 +-1 -1 @@ -671,15 +964,15 @@ False True -6 +0 - + -0 +1 -AREA +LINE 1 @@ -691,21 +984,21 @@ False %5.2lf%s -Inbound +CPU Reserved Capacity -1 -VMwareHost_netPacketsRx +VMwareHost_cpuReservedcapacity AVERAGE - + -1 +0 LINE @@ -720,13 +1013,13 @@ False %5.2lf%s -Outbound +CPU Usage -1 -VMwareHost_netPacketsTx +VMwareHost_cpuUsage AVERAGE @@ -734,7 +1027,7 @@ AVERAGE - + 100 @@ -742,13 +1035,13 @@ AVERAGE 500 -Hz +bytes False -False +True -1 @@ -760,15 +1053,15 @@ False True -0 +2 - + 1 -LINE +AREA 1 @@ -780,27 +1073,24 @@ False %5.2lf%s -${graphPoint/id} +Active Memory -1 - -1000000,* - -VMwareHost_cpuReservedcapacity +VMwareHost_memActive AVERAGE - + 0 -LINE +AREA 1 @@ -812,16 +1102,13 @@ False %5.2lf%s -${graphPoint/id} +Granted Memory -1 - -1000000,* - -VMwareHost_cpuUsagemhz +VMwareHost_memGranted AVERAGE @@ -837,7 +1124,7 @@ AVERAGE 500 -B +bytes False @@ -855,10 +1142,10 @@ True True -4 +5 - + 0 @@ -875,14 +1162,11 @@ False %5.2lf%s -${graphPoint/id} +Swap Space Used -1 - -1024,* - VMwareHost_memSwapused @@ -918,7 +1202,7 @@ False True -5 +6 @@ -943,9 +1227,6 @@ Inbound -1 - -8192,* - VMwareHost_netReceived @@ -975,9 +1256,6 @@ Outbound -1 - -8192,* - VMwareHost_netTransmitted @@ -991,7 +1269,7 @@ AVERAGE -Products.ZenModel.Device +ZenPacks.community.VMwareESXiMonitor.ESXiVM @@ -1109,6 +1387,94 @@ True + + + +/Perf/CPU + + +5 + + +['VMwareGuest_cpuUsageMin', 'VMwareGuest_cpuUsageMax'] + + +True + + +90 + + +0 + + + + +/Perf/CPU + + +3 + + +['VMwareGuest_cpuUsageMin', 'VMwareGuest_cpuUsageMax'] + + +True + + +90 + + +80 + + +0 + + + + +/Perf/Memory + + +5 + + +['VMwareGuest_memUsage'] + + +True + + +90 + + +0 + + + + +/Perf/Memory + + +3 + + +['VMwareGuest_memUsage'] + + +True + + +90 + + +80 + + +0 + + + @@ -1118,7 +1484,7 @@ True 500 -percentage +percent False @@ -1127,10 +1493,10 @@ False False --1 +0 --1 +100 True @@ -1139,10 +1505,32 @@ True 1 - + + +0 + + +CPU Critical + + +Critical Threshold + + + 1 + +CPU Warning + + +Warning Threshold + + + + +4 + AREA @@ -1156,24 +1544,21 @@ False %5.2lf%% -${graphPoint/id} +CPU Usage (Average) -1 - -100,/ - -VMwareGuest_cpuUsageMax +VMwareGuest_cpuUsageAvg AVERAGE - + -2 +3 AREA @@ -1188,24 +1573,21 @@ False %5.2lf%% -${graphPoint/id} +CPU Usage (Max) -1 - -100,/ - -VMwareGuest_cpuUsageAvg +VMwareGuest_cpuUsageMax AVERAGE - + -0 +2 AREA @@ -1220,14 +1602,11 @@ False %5.2lf%% -${graphPoint/id} +CPU Usage (Min) -1 - -100,/ - VMwareGuest_cpuUsageMin @@ -1245,7 +1624,7 @@ AVERAGE 500 -Bps +bytes/sec False @@ -1266,7 +1645,7 @@ True 4 - + 0 @@ -1283,14 +1662,11 @@ False %5.2lf%s -${graphPoint/id} +Disk Usage -1 - -1024,* - VMwareGuest_diskUsage @@ -1300,7 +1676,7 @@ AVERAGE - + 100 @@ -1308,7 +1684,7 @@ AVERAGE 500 -B +percent False @@ -1317,53 +1693,43 @@ False False --1 +0 --1 +100 True -3 +2 - + -1 - - -AREA - - -1 - - -True +0 - -%5.2lf%s + +Memory Critical -${graphPoint/id} - - --1 +Critical Threshold - -1024,* + + + +1 - -VMwareGuest_memConsumed + +Memory Warning - -AVERAGE + +Warning Threshold - + -0 +2 AREA @@ -1372,22 +1738,19 @@ AREA 1 -True +False -%5.2lf%s +%5.2lf%% -${graphPoint/id} +Memory Usage -1 - -1024,* - -VMwareGuest_memOverhead +VMwareGuest_memUsage AVERAGE @@ -1395,7 +1758,7 @@ AVERAGE - + 100 @@ -1403,7 +1766,7 @@ AVERAGE 500 -percentage +Hz False @@ -1421,15 +1784,15 @@ False True -2 +0 - + 0 -AREA +LINE 1 @@ -1438,19 +1801,16 @@ AREA False -%5.2lf%% +%5.2lf%s -${graphPoint/id} +CPU Usage -1 - -100,/ - -VMwareGuest_memUsage +VMwareGuest_cpuUsage AVERAGE @@ -1458,13 +1818,16 @@ AVERAGE - + 100 500 + +bytes + False @@ -1481,36 +1844,62 @@ False True -0 +3 - + -0 +1 -LINE +AREA 1 -False +True %5.2lf%s -${graphPoint/id} +Host Memory Consumed -1 - -1000000,* + +VMwareGuest_memConsumed + + +AVERAGE + + + + +0 + + +AREA + + +1 + + +True + + +%5.2lf%s + + +Overhead Memory + + +-1 -VMwareGuest_cpuUsage +VMwareGuest_memOverhead AVERAGE diff --git a/ZenPacks/community/VMwareESXiMonitor/parsers/__init__.py b/ZenPacks/community/VMwareESXiMonitor/parsers/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/ZenPacks/community/VMwareESXiMonitor/parsers/vmware.py b/ZenPacks/community/VMwareESXiMonitor/parsers/vmware.py deleted file mode 100644 index 055bd50..0000000 --- a/ZenPacks/community/VMwareESXiMonitor/parsers/vmware.py +++ /dev/null @@ -1,58 +0,0 @@ -################################################################################ -# -# This program is part of the VMwareESXiMonitor Zenpack for Zenoss. -# Copyright (C) 2014 Eric Enns, Matthias Kittl. -# -# This program can be used under the GNU General Public License version 2 -# You can find full information here: http://www.zenoss.com/oss -# -################################################################################ - -from Products.ZenUtils.Utils import getExitMessage -from Products.ZenRRD.CommandParser import CommandParser - -class vmware(CommandParser): - #this method is the only one required for a zencommand parser - #its purpose is to store the results into the RRD files - def processResults(self, cmd, result): - #grab the output resulting from the command - output = cmd.result.output - output = output.split('\n')[0].strip() - #get the exit code from the command - # not exactly sure what it means - exitCode = cmd.result.exitCode - #gets the severityt that is associated with the command - severity = cmd.severity - #output looks like eg ("guestperf|memUsage=1000 ...") - #make sure we are getting the correct output - if output.find('|') >= 0: - #msg = substring left of the | - #values = substring right of the | - msg, values = output.split('|', 1) - else: - #msg = output - #values = '' - msg, values = output, '' - msg = msg.strip() or 'Cmd: %s - Code: %s - Msg: %s' % (cmd.command, exitCode, getExitMessage(exitCode)) - if exitCode != 0: - result.events.append( - dict( - device=cmd.deviceConfig.device, - summary=msg, - severity=severity, - message=msg, - performanceData=values, - eventKey=cmd.eventKey, - eventClass=cmd.eventClass, - component=cmd.component - ) - ) - - for value in values.split(' '): - if value.find('=') > 0: - label, val = value.split('=') - for dp in cmd.points: - if dp.id == label: - result.values.append( (dp, val) ) - break - diff --git a/setup.py b/setup.py index ef413bb..95a357c 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # or saved. Do not modify them directly here. # NB: PACKAGES is deprecated NAME = "ZenPacks.community.VMwareESXiMonitor" -VERSION = "2.0.1" +VERSION = "2.0.4" AUTHOR = "Eric Enns, Matthias Kittl" LICENSE = "" NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.community']