Wednesday, February 18, 2009

Zenoss: monitor free VMWare ESXi version

We confirmed that the free ESXi version does not allow SNMP gets, only traps.

The original script was taken from here:
http://communities.vmware.com/docs/DOC-7170

Modified script:
http://mirakulo.com/pub/esxi/check_esx_wbmem.py

We added Fan and power supply, hinted from this page:
http://www.stephenjc.com/2009/01/whatsup-vmware-esxi-monitor-these.html

Use this guide to add the Data source:
http://www.zenoss.com/community/docs/howtos/create-modify-nagios-templates

Added as template under:
/Devices /Server /VMWare /ESXi /Templates /esxi-monitor /check_esx_wbmem

Name: check_esx_wbmem
Source Type: Command
Enable true
Use SSH false
Component: blank
Event class: /VMWare/ESXi
Severity: Error
Cycle time: 60
Parser: auto
Command template:
/usr/local/zenoss/python/bin/python /opt/zenoss/libexec/check_esx_wbmem.py https://${dev/manageIp}:5989 root passwd

To bind this template to ESXi nodes, go to the device:
Example: /Devices /Server /VMWare /ESXi /esxi-01.prod.corp.org

then to its templates:
http://site/zport/dmd/Devices/Server/VMWare/ESXi/devices/esxi-01.prod.corp.org/objTemplates

Menu > Bind templates > Select both the default plus newly created esxi-monitor perf template.

Go back to ESXi suborg, ie:
/Devices /Server /VMWare /ESXi

Access zProperties:
http://site/zport/dmd/Devices/Server/VMWare/ESXi/zPropertyEdit

Change zCommandCommandTimeout from 15 to 30.

zencommand restart.