Skip to main content

Email Creation - VMWare ESXi Monitoring

Summary

This script is intended for use as an Autofix script in conjunction with the internal monitor sets of an ESXi Host. The use of this script is subject to the following requirements:

The Device ID of the ESXi host must be specified as the Test Value/Result in the monitor set. All relevant data to be included in the email must be specified in the Field Name/Identity Field.

The script makes use of several variables that can be referenced in the monitor’s alerting tab, including @ESXHostName@, @ESXVersion@, @ESXMakeModel@, @ESXIPAddress@, and @ESXSN@. An example of an email subject generated by this script is “ESXi Bad Sensors Detected - @ESXHostName@ (@ESXIPAddress@),” which incorporates the Host Name and IP address of the ESXi host.

It creates an email and sends that email to the designated contact identified in the system property _sysTicketDefaultEmail. Therefore, an email address to notify must be set in the _sysTicketDefaultEmail property to use the script.

Sample Run

This script should be utilized as an autofix to a monitor.

It is being used with the △ Custom - Email Creation - VMWare ESXi Monitoring alert template.

Variables

NameDescription
ESXHostNameName of the ESXi host
ESXVersionESXi Version of the host
ESXMakeModelManufacturer and Model of the host
ESXIPAddressIP address of the host
ESXSNSerial Number of the host

Global Parameters

NameExampleRequiredDescription
EmailOnSuccess0 or 1True0 disables emailing a success email. 1 enables emailing a success email.

System Properties

NameExampleRequiredDescription
_sysTicketDefaultEmailsupport@provaltech.comTrueEmail address to alert

Output

  • Script Log
  • Email