Esxmon: VMware hardware monitoring
You can monitor and backup your VMware at the same time using the ghettoVCB fronend.
MKSBackup allows you to monitor your VMware ESX(i) server hardware.
This include RAID array, redundant power supplies, cooling fans or any
other components being monitored by the VMware layer.
Now, it is easy to backup and check the status at the same time.
You don't need to install anything on your ESX(i) server, MKSBackup when installed on a friendly Windows or Linux host, communicates with your VMware server using the CIM-XML protocol, usually on port 5989.
It will enumerate the specified WBEM provider class instances and search for properties OperationalStatus and HealthState. If any of them have a bad status, MKSBackup will report the error.
An email can be sent at every check or only when the status has changed using the mail_when option.
You can also monitor your server from the MagiKmon board and be warned as soon as something goes wrong or if the status has not been updated for too long !
You can schedule a regular check in your Un*x cron or in your Windows Task scheduler.
For more information on how to install and start MKSBackup, visit the Overview page. You have the choice between multiple scenarios:
Monitor from a Windows host
After you have installed MKSBackup into C:\Magik\MKSBackup, create C:\Magik\mksbackup.ini like this:
url=https://<your vmware host ip>:5989
password=<your vmware password>
Modify the url and password to match your server configuration. Also setup the mail configuration to match your network setup.
Now start the program !
C:\Magik> c:\Magik\mksbackup\mksbackup.exe -c C:\Magik\mksbackup.ini -d backup ESXMON
The backup command is a little confusing, but remember MKSBackup is first a backup tools :-). And look at the output !
08:00:57,655 INF start version=0.9.8 cmd=['mksbackup', '-c', 'mk.ini', '-d', 'backup', 'ESXMON']
08:00:58,030 INF class list: CIM_Sensor, CIM_PowerSupply, CIM_Chassis, CIM_ComputerSystem, CIM_NumericSensor, CIM_Memory, CIM_PhysicalMemory, CIM_Processor, CIM_LogRecord, CIM_RecordLog, CIM_EthernetPort, CIM_SoftwareIdentity, OMC_SMASHFirmwareIdentity, OMC_DiscreteSensor, OMC_Fan, OMC_PowerSupply, OMC_RawIpmiSensor, OMC_RawIpmiEntity, VMware_StorageExtent, VMware_Controller, VMware_StorageVolume, VMware_Battery, VMware_SASSATAPort, OMC_PhysicalMemory
08:00:58,046 INF No errors in section: ESXMON
08:00:58,046 INF start command=backup job=ESXMON archiver=esxmon
08:00:58,046 INF start url=https://192.168.1.11:5989
08:00:59,217 WAR class CIM_Memory: The requested object could not be found
08:01:03,467 INF status: OK
08:01:03,467 INF end command=backup job=ESXMON archiver=esxmon
08:01:03,467 INF name=ESXMON
08:01:03,467 INF program=esxmon
08:01:03,483 INF version=0.9.8
08:01:03,483 INF status=OK
08:01:03,483 INF hostname=pcasx
08:01:03,483 INF exit_code=0
08:01:03,483 INF start=Wed Oct 20 08:00:58 2010
08:01:03,483 INF end=Wed Oct 20 08:01:03 2010
08:01:03,483 INF start_epoch=1287554458
08:01:03,483 INF end_epoch=1287554463
08:01:04,265 INF mail sent to: email@example.com, firstname.lastname@example.org
You should have received the report to your email addresse. To avoid the warning, we will exclude CIM_Memory class from the check by adding this line:
Monitor from a Linux host
Since version 0.9.22 PyWBEM package is include in MKSBackup and you don't need to install it on you linux host anymore.
The use under Linux is quasi identical to the Windows sample above. Read it for more !
You can run the command at regular interval in your cron like this.
# mksbackup VMware monitoring */5 * * * * [root] /usr/bin/mksbackup -q -l /var/log/mksbackup.log -c /etc/mksbackup/mksbackup.ini backup ESXMON
Be careful to include or not the root user depending you are using crontab -e or you are editing system cron files. Go back to How to schedule MKSBackup for more.
Integration with MagiKmon
The status can be sent to a monitoring service called a guard. Create such a service under your MagiKmon account and take note of the URL of this service, then add this URL to your mksbackup.ini file like this.
Now, every time MKSBackup runs, it will send the status of your VMware server to your MagiKmon board every time it has changed or at least once every hour.
If the email configuration is active, you will receive the status by email depending on how you setup the mail_when option. You can also disable the email adding this line to your ESXMON section.
To use this back-end, program must be set to esxmon.
This is the address where CIM service is waiting for connections. Usually the service bind to the port 5989 and use https communication protocol.
This is the account used to login to your ESX(i) server. You can use the root account.
This is the password of your login account on your ESX(i) server.
mail_when (optional, default is always)
This option tell MKSBackup when to send the mail report:
- always will send an email a each run.
- status every time the status has changed.
- change every time the report or the status has changed.
- <integer> like change, but this is the interval in second at witch the mail will be sent even if nothing has changed.
- never will never send any emails (versions above 0.9.9)
If you choose to monitor your server using MagiKmon, this is the address of the magikmon service in charge of your server. MKSBackup will send the status at this URL. You can find this address in the definition of the service in the MagiKmon interface.
verbose (optional, default is yes)
This is a boolean switch, possible values are yes or no. If set to yes, the status of all properties will be included in the output report. When set to no, only properties used to calculates the status are included.
friendly_value (optional, default is no)
This is a boolean switch, possible values are yes or no. Usually values of properties are senseless numerical values. When set to yes, and when a translation table exists, MKSBackup will replace the value by its more friendly equivalent in the table.
This is a space separated list of classes MKSBackup will check. If not specified a default list will be used. Don't modify this list, use instead class_include and class_exclude to alter the default.
class_list=CIM_Sensor CIM_PowerSupply CIM_Chassis CIM_ComputerSystem CIM_NumericSensor CIM_MemoryCIM_PhysicalMemory CIM_Processor CIM_LogRecord CIM_RecordLog CIM_EthernetPort CIM_SoftwareIdentity OMC_SMASHFirmwareIdentity OMC_DiscreteSensor OMC_Fan OMC_PowerSupply OMC_RawIpmiSensor OMC_RawIpmiEntity VMware_StorageExtent VMware_Controller VMware_StorageVolume VMware_Battery VMware_SASSATAPort
This is a space separated list of classes MKSBackup will add to the above class_list parameter.
This is a space separated list of classes MKSBackup will not check at all. This allow you to remove classes that are generating useless error message or reporting incorrect values.
This is a space separated list of properties that MKSBackup will ignore. This is useful to ignore a false positive value or if MKSBackup generate error when handling the property.
You can ignore a property using its name: Capacity, or qualify the property with it class like this CIM_PhysicalMemory.Capacity to ignore the property for one class and all its instances. Or fully qualify the property with it class and instance like this CIM_PhysicalMemory.DIMM3.Capacity to ignore one specific instance !
property_exclude=Capacity, CIM_PhysicalMemory.Capacity, CIM_PhysicalMemory.DIMM3.Capacity
The mail report reproduce the usual structure but can also include the following attachments.
This is a list of properties=values for every specified classes. The file looks like this :
===== CIM_PhysicalMemory DIMM3 =====
OK OperationalStatus= (Unknown)
===== CIM_Processor LGA775 =====
Characteristics= (64-bit Capable, Enhanced Virtualization, NX-bit, Power/Performance Control)
EnabledProcessorCharacteristics= (Enabled, Enabled, Enabled, Disabled)
ModelName=Intel(R) Core(TM)2 Quad CPU @ 2.40GHz
OK OperationalStatus= (OK)