ESXi Health Monitor Plugin
Well it’s finally here, the plugin we have all been waiting for, Vmware ESXi Health Monitor plugin for Labtech. This plugin installs into your Labtech system as a Location plugin to monitor the CIM data available in most hardware. Easy to configure controls and full view of the CIM data collected is just part of what this plugin can do. We have incorporated new functions into this plugin that are stark differences from our earlier version 2 and version 1 ESXi Health Monitors. We are now supporting multiple usernames and passwords per location for ESX hosts and only require 1 probe system to monitor all the ESX hosts at a single location. I could talk all day about the plugin but maybe it’s better if I show you.
Here is the main view of the ESXi Health Monitor plugin.
The hosts get listed with status face based on current status and when you select a host the CIM data is displayed so you can see all the reported statuses of the hardware.
This is the ESXi host configuration tab of the ESXi health Monitor plugin.
This is where you will add and edit your host systems to monitor, you can set the system you want to be responsible for probing the ESXi hosts for the CIM data. Then you select a system and “Set” it as the probe the plugin will launch a script against the probe to prep it for monitoring automatically. You will not need to “install” the probe software manually as this is handled by the plugin when the probe system is selected.
The ESXI Health Monitor plugin uses a custom group to locate all the probes available by using a custom search to locate all systems with the EDF of “VMware Master CIM Scanner” selected as seen it the example below. You will find this setting under the Info tab -> VMWare on any system console. Just checking it will not install probe software so you must “Set” the probe via the plugin.
The Custom group should look like this and have the custom search setup as seen in this example.
The custom group also has a scheduled script to run every 2-4 hours and I use the exclude time range as I do not need this data so bad that I can’t sleep with out it running every hour or 2. This is just my personal preference but saves on CPU cycles during backup windows and maintenance schedules. You will need to reset this when you import your group as this seems to always get rest to nothing during imports.
You can see your probe run on the system by watching the script logs on the probe systems console. This helps when troubleshooting common issues.
This version is in Beta! this is the first release of this plugin and as such may have odd behavior issues and or may not work for you as expected. I seriously doubt you will have any issues but as this is Beta expect a few minor glitches. We are actively working on updates and with your help we can make this a great plugin!
You can run the version 2 and version 3 side by side and they will not effect each other.
Updates:
———————————————————————————————————-
Changes in New Version 0.3.0.3
Changed Version number back to what it should of started at. It was a typo starting with (3)
Added Internal monitor called CIM – VMWare ESXi Health Monitor
Added Client View and Global View of System Statuses
Corrected a few minor coding mistakes
Added Linux Probe Support
Updated the data views
Changes in New Version 0.3.0.5
Added Last Scan Time Stamps
Added color coded data views
Added new images
Changes in New Version 0.3.0.6
Fixed Scan Time not updating
Changes in Version 3.0.7
Updated Python Packages to 2.7.8
Fixed several SQL issues with table creation.
Minor enhancements
Changes in Version 3.0.8
Added new instant host probe from the configure tab
Fixed minor issues in plugin
Fixed issues with installer script
Changes in Version 3.0.9
Fixed CIM Monitor in LT
Fixed Versioning context
Fixed password bug when resaving the same password for esx probe.
Changes in Version 3.0.10
Fixed Issues with Installer where latest PY script requires several new Python modules.
New Client Level View
This view give you a look at all systems under the clients control. you can select the system and review the CIM data returned.
This plugin monitors the condition all the systems and will alarm when a system is found to be in error. You can customize the alarms and the methods of alerts received through the Monitors management interface in Labtech .
You can download the latest version here.
Version 3.0.10 Now Available
Download extra packages only if needed
If you like what we are doing then please donate to our cause, help keep our software free.
How to install plugin
Please post here any comments and issues you may have so we can get them fixed and out in the next release.
Enjoy
Cubert 😎
Greetings;
I have everything set up and scheduled a ‘Run Once’ of the hardware monitor script so as not to wait a day. It ran and then failed on the second host:
—
The script(6034) failed in the THEN section at step 12
Start S6034
IF F95 P1:32c6e3aa-d95c-11e3-b28a-005056 P2:9 P3:2 T:39150.3763894
L1 F154 P1:%ltsvcdir%\CIM P2: P3: T:39150.877418
L2 F20 P1:1 P2:1 P3:HOSTCOUNT T:39154.3796184
L3 F196 Parameters Hidden T:39154.879647
L4 F139 P1::HOSTCIMLOOP P2: P3: T:39155.3796756
L5 F29 P1:Inside CIM Loop [1] P2: P3: T:39155.8797042
L6 F197 P1:sqldataset P2:1 P3: T:39156.3797328
L7 F20 P1:1 P2:192.168.42.181 P3:ESXHOST T:39156.8797614
L8 F29 P1:Collecting CIM data from 192.1 P2: P3: T:39157.37979
L9 F29 P1:c:\python25\python.exe C:\Pyth P2: P3: T:39157.8798186
L10 F109 P1:c:\python25\python.exe C:\Pyth P2: P3:PYTHONCMD T:39158.3798472
L11 F235 P1:0 P2:#—————————– P3: T:39173.8827339
L12 F20 P1:7 P2:%ltsvcdir%\CIM\192.168.42.181. P3:MYSQLSTMT T:39186.3904493
L13 F101 P1:1 P2:0 P3:1 T:39192.8918211
L14 F70 P1:MYSQLSTMT P2:9 P3:, T:39193.3918497
L16 F20 P1:1 P2:REPLACE INTO `plugin_sw_vmware P3:SQLSTMT T:39194.393907
L17 F29 P1:@SQLDELSTMT@ P2: P3: T:39194.8939356
L19 F67 Parameters Hidden T:39195.8939928
L20 F29 P1:Updating CIM data for 192.168. P2: P3: T:39196.3950215
L21 F13 P1:%ltsvcdir%\CIM\192.168.42.181. P2: P3: T:39196.8950501
L22 F13 P1:%ltsvcdir%\CIM\192.168.42.181. P2: P3: T:39206.4005938
L23 F70 P1:HOSTCOUNT P2:5 P3:7 T:39212.9329674
L5 F29 P1:Inside CIM Loop [2] P2: P3: T:39213.432996
L6 F197 P1:sqldataset P2:2 P3: T:39213.9330246
L7 F20 P1:1 P2:192.168.42.182 P3:ESXHOST T:39214.4330532
L8 F29 P1:Collecting CIM data from 192.1 P2: P3: T:39214.9330818
L9 F29 P1:c:\python25\python.exe C:\Pyth P2: P3: T:39215.4331104
L10 F109 P1:c:\python25\python.exe C:\Pyth P2: P3:PYTHONCMD T:39215.933139
L11 F235 P1:0 P2:#—————————– P3: T:39225.4356825
L12 F20 P1:7 P2:%ltsvcdir%\CIM\192.168.42.182. P3:MYSQLSTMT T:39234.9422263
Ok, Lets goto your probe system and login, open up a cmd prompt and type at prompt:
c:\python25\python.exe C:\Python25\check_esxi_hardware.py -H 192.168.42.182 -U root -P yourpasswordhere –verbose >> c:\windows\LTSvc\CIM\192.168.42.182.txt
Then goto C:\windows\ltsvc\CIM\ directory and see if file exists or did you get an error at the prompt?
Ok, it looks like just a password issue:
——-
20140519 10:53:37 Connection to https://192.168.42.182
20140519 10:53:37 Check classe OMC_SMASHFirmwareIdentity
20140519 10:53:37 Global exit set to UNKNOWN
UNKNOWN: Authentication Error
UNKNOWN: Authentication Error
Do you need to uninstall the previous version before installing this new one?
Nevermind, I read above they can run side by side. Now to get this working for linux agents 🙂
Unfortunately not working for me, the plug-in does not show in the dashboard->config->Integration
You should have in version 0.3.0.2 plugin tabs at the Location , Client and Dashboard levels. If not fist confirm the version in Plugin manager. if not on version 0.3.0.2 then you will only have 1 tab at the location level.
Ok! I got all the authentication issues worked out. The script is completing successfully. But my Location screen isn’t updating with health data. I have all the servers listed, but the right-hand panel is blank.
Cubert –
I don’t have any plugin tabs at the client or location, of course I do have them in the dashboard but not for the VMware ESXi monitoring. I did install all 3 XML files, I noticed there is a .dll file thats included with no instruction of what to do with it. I placed it in my Labtech plugins folder. I do have the VMWare Master CIM Scanner checkbox under an Agents Info->VMware tabs. The group VMwareESXi Host Monitors group was also successfully created. Just the fancy plugin portions appear to be missing. Rebooted the server after install, no change.
Jack – I was puzzled by this myself.
Go to HELP -> PLUGIN MANAGER.
Top button: ADD PLUGIN
Browse to the DLL location.
Conner edit the probe script and disable function line 22 and 23. Rightclick the line and select disable function. This will prevent the script from deleting the files it uses to import data. You should then after running script have both a .txt file and a .sql file for each host you probe. in the SQL file is there
(ID,ID,ID,Hostname,Event,Status)
lines in the SQL file?
If so then check the database tables, “plugin_sw_vmware_healthmon_cimdata” exists and has data in it.
If both check out let me know .
also
You can force the probe to run by selecting the system you installed probe to then execute the VMware ESXi HealthMonitor Probe script against system. That will start the data collection for that client.
The master group should have this script scheduled to run every 2 hours. This does not always schedule correctly when importing scripts so you should always check the group for a scheduled script to run.
Next make sure your group is populating from the custom search. You may want to force a update of the group after you set probes so they join custom group faster. Then execute the probe script on the group will refresh all clients.
Yeah…that all checks out so far.
– I have the files in the CIM folder
SQL data:
—
( 1 , 2 , 9 , ‘192.168.43.200’ , ‘ Chassis’, ‘0’)
,( 1 , 2 , 9 , ‘192.168.43.200’ , ‘ System Board 7:1’, ‘0’)
,( 1 , 2 , 9 , ‘192.168.43.200’ , ‘ System Board 7:2’, ‘0’)
,( 1 , 2 , 9 , ‘192.168.43.200’ , ‘ System Board 7:3’, ‘0’)
TXT data:
—
20140520 13:33:27 Connection to https://192.168.43.200
20140520 13:33:27 Check classe OMC_SMASHFirmwareIdentity
20140520 13:33:28 Element Name = System BIOS
20140520 13:33:28 VersionString = P62
– The table plugin_sw_vmware_healthmon_cimdata exists and there is data in it as expected.
It just doesn’t update the display in my LT Location tab.
Oh, and the group, search and scheduled script all seem to be set up correctly. If I run it manually, the files are generated with no issues.
Just to clarify process,
You import scripts, you use plugin manager to add plugin DLL file, edit the new Group imported and verify that scheduled script is scheduled, if not schedule the vmware ESXi Heathmonitor Probe script, open your new plugin at a location level and add new probe system and new hosts.
Once probe install is completed verify it is showing up in new group. This may take 10 to 15 minutes to show up in group, Then manually execute probe against group or wait till group executes probe, go see your data…
if probe has not run yet then no data will show in CIM fields. Probe only runs on the schedule that the group has set it to run at.
If you do not force probe to run you could be waiting hours before data will show up.
If probe is not in group schedule data will never show up.
so the key here is to make sure search and group are functional otherwise data will never show up or update.
Lastly, If you just set this plugin up and are not seeing data after you see a successful script run then reload your cache in LT console.
Still no joy on the display. Scripts are running without error, I have data in my cimdata datable that is updated, and I’ve cleared cache and reloaded the client, but the cim data stays blank on the Location tab. 🙁
I have the same issue as Connor:
Location screen isn’t updating with health data, all servers are listed, but the right-hand panel is blank.
Everyone, I have found a bug in the probe plugin. I am actively working the issue and should have a new version update out asap.
New version 0.3.0.3 will also be released with Linux probe support. I heard someone out there really need that.
Awesome! Thanks Cubert!
Hi Cubert, any progress on the fix and/or linux agent? I can start converting the monitor script for linux use if you’re not starting it yet.
3.0.3 is now released and has Linux support… just download and follow the readme file in zip.
Enjoy
Cubert
If you have this plugin previously installed, should you wipe out the existing scripts, group and plugin and install from scratch, or just update the plugin?
Right now we are in beta with this plugin so a lot of cleanup and prep is missing inside of the plugin so, there maybe changes in versions that require a removal first.
The hosts table has not changed so keeping your hosts table should be OK but remove the types table as that has changed.
Then just update the plugin DLL inside of plugin manager. Restart you console after the updates to make sure they take.
I would also remove and re import the master script file as the backend Powershell script has also updated. Rename the old script to (.old) and then a new powershell script should be created when importing main script.
I feel dense today – where do I locate the back end Powershell script? There’s a Perl script in \Transfer\Utilities\VMWare on the LTShare and an embedded Powershell script in the ESXi Monitor script, and Python scripts in the Network Probe CIM folder…?
I think I got it.
Connor, can you share?
I took a stab and renamed “check_esxi_hardware.pl” in L:\Transfer\Scripts.
However, you probably shouldn’t listen to me, as I seem to have screwed it up pretty good. I had initially tried to install over the top. Then when I went to do a fresh install I realized I had never dropped the SQL tables. I dropped those two SQL tables (besides the Host table), updated the plugin and reimported the objects.
Now I have two tabs for ESX Health Monitor on my Location, and my tables never came back. 🙁
I’m going to tear it all down and try again tomorrow.
If you need to recreate the SQL tabled (Not HOST table) Then you can use this SQL script to recreate the CIMData and Type tables and the data that is needed in Types table.
Get the SQL script here
https://squidworks.net/wp-content/uploads/2014/05/esxhealtmon-create-secondary-tables.zip
Success! I had to alter the script slightly however to get it to work. SQLYog refused to run it, claiming a syntax error. By pasting the first two sections individually I created the tables. The SQL insert sections had a couple of places where there were only three values instead of four:
(‘unknown’, 13 , ‘Lost Communication’)
…but I copied the status value from another section.
The only issue now is that I still have duplicate tabs in the Dashboard and on my Location. The both work at least, though!
http://imgur.com/pEksG3T
Slight correction – although data is now displayed in the right-hand pane, and there’s a Red status on one server I know has an issue, the data is not changing when I click from one serve to the next. I’m going to dump the data out of the cimdata table and re-run.
Hey Cubert, great work on this plugin! Everything seems to be working except for some of the items that others seem to have posted and possibly one other:
1) Not able to see any data other than a smiley face and host in the Locations tab Status section. I verified that the data does exist in the plugin_sw_vmware_heathmon_cimdata table for the applicable hosts. This the first time I’d installed this plugin.
2) When I click from one tab to another in the Location the Host Status list appends a new set of the same hosts over and over again. So instead of Host1, Host2, Host3 I get Host1, Host2, Host3, Host1, Host2, Host3, and so on.
Hey, so far I too am not getting any data other than the smiley face on the global view nor the client view. The CIM monitor also has no targets set, not sure if thats an issue though.
Hello,
I got everything imported and it looks good but I ma missing the CIM monitor. Smiley faces are there but no details under hardware. Where can I get that CIM monitor?
Once you push out a probe, monitor it’s scripts tab for completion of the probe installer script.
You should be able to then see that the flag on that probe is now set (look at Info tab ->VMware on probe system console for check box to be checked “VMware MAster CIM Scanner”.
That will indicate that the probe was installed and set correctly. If you imported the search and group correctly then the group should start to auto populate with probes as the autojoin starts finding installed probes.
once a probe shows up in group it will get a scheduled script to launch on it every XXX hours. Open your group and look at scheduled scripts to verify the script & schedule exists and that it is on a time frame that works for you.
If schedule exists and script exists and probes show up in group then once the first scheduled script runs you will have your data and the alerting will begin.
Until all this happens there will be now data for each host.
You can force the master miner script to run on your probe or schedule it directly to a probe but this is not the suggested method.
So to recap:
Push probe to system
Check Scripts tab for install logs
Check Info Tab -> VMware -> CIM Scanner check box is checked
Check Group and search
Check group scheduler for CIM miner script
Watch group for Autojoin to happen
see if scripts get scheduled
see Script run
go look at data.
repeat last 2 steps
Cubert,
Where can i download the CIM monitor that you added in? I dont have it in the list of internal monitors.
Importing that latest plugin should have created it for you automatically.
Run this SQL query to see if it exists.
SELECT count(*) FROM agents where name = ‘CIM – VMware ESXi Health Monitor’;
If it returns 0
Then run this SQL query
INSERT INTO `Agents` (`Name`,`LocID`,`ClientID`,`ComputerID`,`DriveID`,`CheckAction`, `AlertAction`,`AlertMessage`,`ContactID`,`interval`,`Where`,`What`, `DataOut`,`Comparor`,`DataIn`,`LastScan`,`LastFailed`,`FailCount`, `IDField`,`AlertStyle`,`Changed`,`Last_Date`,`Last_User`,`ReportCategory`, `TicketCategory`,`Flags`) Values(‘CIM – VMware ESXi Health Monitor’,’0′,’0′,’0′,”,’0′,’49’,’%NAME% %STATUS% for %FIELDNAME% result %RESULT%.~~~VMware ESXi Health Monitor Notice\r\n%NAME% %STATUS% on %CLIENTNAME%\\%COMPUTERNAME% at %LOCATIONNAME% for %FIELDNAME% result %RESULT%.!!!%NAME% %STATUS% for %FIELDNAME% result %RESULT%.~~~VMware ESXi Health Monitor Alarm\r\n%NAME% %STATUS% on %CLIENTNAME%\\%COMPUTERNAME% at %LOCATIONNAME% for %FIELDNAME% result %RESULT%.’,’1′,’14400′,’plugin_sw_vmware_healthmon_cimdata’,’CIM_Value’,’CIM_Value IN (SELECT DataValue FROM plugin_sw_vmware_healthmon_types WHERE \`DataStatus\` NOT LIKE \’%Good%\’ and DataType IN (\’dell\’))’,’3′,’0′,’2014/06/22 13:20:13′,’2014/06/22 13:20:17′,’2046′,”,’0′,’0′,’2014/06/22 13:20:17′,’root@localhost’,’1′,’103′,’0′);
This will create the new monitor for you.
Good afternoon Cubert,
I followed all of the steps. Plugin installed, probe set up, all XML, autojoins working, scripts run and are successful. However, I am not getting any data in my SQL database and consequently populated in Labtech.
When I review the script logging it states that there is no CIM data, but I don’t see how this can be because when I open vSphere and review the host I see lots of health data.
Any suggestions? Everything else looks to be set up fantastically! Great job!
Luke,
Try the following, at the cmdline of the probe system run the following..
c:\python25\python.exe C:\Python25\check_esxi_hardware.py -H 192.168.42.182 -U root -P yourpasswordhere –verbose >>
c:\windows\LTSvc\CIM\192.168.42.182.txt
Then goto C:\windows\ltsvc\CIM\ directory and see if file exists or did you get an error at the prompt?
Now check to see if there is also a SQL file with the same name. (*).sql
If they both check out as good and has data in them take a look at the database table plugin_sw_vmware_hostmon_cimdata for those entries.
Says there’s no module pywbem. Is this a piece imported from your scripts or no?
-Luke
Cubert,
All is working well, I had to manually install Python 2.5 and the pywbem module. I was able to query the vmhost via command line then and gather data into the SQL database and plugin.
All is well now!
Thanks again!
-Luke
How do I update the plugin? Looks like there is a new version available with some bug fixes. Do I just re import everything into Labtech?
Yeap, Just reimport and test.. If you have any issues post them here.
Just added an additional three hosts but getting the following error for any of the new ones.
ERR an error occurred: Could not find file ‘C:\Windows\LTsvc\CIM\192.168.1.183.sql’.
How do I fix this?
Regarding the monitor that is added to the Internal Monitors, where should I enable it? Should it be enabled on the group VMwareESXi Host Monitors? Please advise. I have the plugin working but I don’t want to miss an alert when something happens.
Hi Cubert,
Trying to install v3 of this plugin into LabTech v60.276.
When I run the script “VMWareESXi HeathMonitor Probe” (as the group would) it fails as follows.
I ran the SQL query in the comments and got a result of 0. So ran the INSERT and now get a result of 1.
Not sure if it makes a difference, but when I go to Info > VMWare on the probe computer I only see 1 checkbox for VMWare Master CIM Scanner.
The script(5777) failed in the THEN section at step 8
Start S5777
IF F95 P1:32c6e3aa-d95c-11e3-b28a-005056 P2:4 P3:2 T:54241.4427905
L1 F67 Parameters Hidden T:54241.9448243
L3 F154 P1:%ltsvcdir%\CIM P2: P3: T:54242.9488834
L4 F20 P1:1 P2:1 P3:HOSTCOUNT T:54267.4552965
L5 F196 Parameters Hidden T:54267.9563124
L6 F139 P1::HOSTCIMLOOP P2: P3: T:54268.4583402
L7 F29 P1:Inside CIM Loop [1] P2: P3: T:54268.9593714
L8 F197 P1:sqldataset P2:1 P3: T:54269.9254281
Can I also put in a request that the passwords not be in plain text / visible on the Probe Config screen? Or if possible to use saved passwords from the standard labtech passwords?
Ignore my first comment, this is now working. It was due to the probe not being installed yet on the server.
I am now getting data. Still have conserns around the security of the plain text password tho.