ESXi health status
This is a perl script which will generate health report for ESXi server. You need to have
vSphere CLI installed. The script can generate
text or HTML reports, and automatically mail them.
esxi_health_status.pl - ESXi health report script
mail_health_report.cmd - simple wrapper for Windows
mail_health_report.sh - simple wrapper for Linux
The easiest way to use the script is to download the perl script and the wrapper for your OS. Open the wrapper in a text editor
and change the values to match your setup, then put the wrapper in cron or Task Scheduler.
Notes:
- VSphere CLI 6.5 and newer do not include Perl any more on Windows, so you need to install
Strawberry Perl or ActivePerl
yoursef.
- ESXi 6.7 seems to not work with older versions of VSphere CLI - install VSphere CLI 6.7 if you have problems getting the script to work.
Creating a limited account for health check script
ESXi Web UI:
- Log in to ESXi Web UI as root
- Expand Host, click Manage and then click Security & Users tab
- Click Roles and Add role...
- Select a name for the role (eg. Health), then click Global and check Health, then click Add.
- Click Users and Add user...
- Set a login name and password for the user and click Add
- Right-click Manage (under Host) and click Permissions
- Click Add user..., select the user and role you created, then click Add user
- With this the user account creation is complete, and you can use this user with the health report script
VSphere Client:
- Log in to vSphere Client as root
- Click Home and then click Roles
- Right-click inside the Roles pane and choose Add...
- Select a name for the role (eg. Health), expand All roles, Global and check Health, then click OK.
- Click Home again, then click Inventory and go to Users tab
- Right-click inside the window and choose Add...
- Set a login name and password for the user and click OK
- Go to Permissions tab, right-click inside the window and choose Add permision...
- Click Add... under Users and Groups, double-click the user you created and click OK
- Under Assigned Role choose the role you created and click OK
- With this the user account creation is complete, and you can use this user with the health report script