Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does anyone recommend any methods for monitoring ESXi 4.1 hosts with Nagios? I have looked into SNMP but it seems to be in a pretty sorry state. Net-SNMP does not seem to be included and there is a built it SNMP daemon that I set up. However from the standard MIBs there only seems to really be network interface counters and the VMWare MIBs seem quite useless.

Right now I am considering SNMP for the interface speed and trying the plugins listed at http://unimpressed.org/post/96949609/monitoring-esxi-performance-through-nagios .

Anyone have a better idea? I would like to monitor the hosts directly, not through something like vCenter.

share|improve this question
    
Any luck with this? –  jrg Oct 2 '12 at 17:52

3 Answers 3

up vote 3 down vote accepted

ESXi only provides comprehensive monitoring via CIM (WBEM\WS-MAN) not SNMP. Whether that was a good decision by VMware or not is an argument for another day but SNMP based monitoring and management support is (as you said) effectively useless. There is a thread on VMware Communities with a basic sample Python Script to provide some glue between ESXi's WBEM\WS-MAN interface and Nagios - I've never tried this as the System's Management tools I use can handle direct management via WS-MAN but it seems like a viable approach provided you are prepared to do a bit of coding in Python.

share|improve this answer

You can monitor ESX hosts directly (or through vSphere) using the check_vmware_api.pl from op5. You can monitor the hardware with the check_esxi_hardware.py plugin (Dell, HP, IBM). They both work exactly as advertised (at this moment we are running ESXi 5.1)

share|improve this answer

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008065

Configuring SNMP Traps for ESXi/ESX 3.5, 4.x, and 5.0 Details

To generate virtual machine and environmental traps from ESX/ESXi 3.5, 4.x and 5.0 hosts, you must configure and enable the embedded SNMP agent. You cannot use the Net-SNMP-based agent to generate these traps, although it can receive GET transactions and generate other types of traps.

This represents a change in behavior from ESX 3.0.x, in which the configuration file for the Net-SNMP-based agent controlled the generation of virtual machine traps. For more information, see Configuring SNMP on an ESX 3.0.x host(1008186). Solution

Use the vicfg-snmp.pl command from the Remote CLI or vSphere CLI to enable the SNMP agent and configure trap destinations. Each time you specify a target with the vicfg-snmp.pl command, the settings you specify overwrite all previously specified settings. To specify multiple targets, specify them in a single command, separated by commas.

To enable and configure SNMP traps:

Notes:

Prior to ESXi 5, ESXi did not include a firewall
Ensure that the SNMP protocol is open in the ESX firewall. For more information, see:

    ESX 4.x: Working with firewall rules in ESX 4.x (1021779)
    ESXi 5.0: By default, the SNMP firewall port 161 is open. If it is not, see the ESXi Firewall Configuration section of the ESXi and vCenter Server 5.0 Documentation.

To implement these steps:

    ESX/ESXi 3.5: Use the Remote CLI. For more information, see the Remote Command-Line Interface Documentation. You can download the VMware Infrastructure Remote CLI from the VMware Download Center.
    ESX/ESXi 4.x and ESXi 5.0: Run this procedure using vSphere CLI, not vSphere PowerCLI.

    For more information, see the vSphere Command-Line Interface Documentation.

    If you have a My VMware profile, you can download vSphere CLI from:

    vSphere 4.x – http://www.vmware.com/download/download.do?downloadGroup=VCLI41
    vSphere 5.0 – http://www.vmware.com/download/download.do?downloadGroup=VCLI50 

    Note: If you do not have a My VMware profile, you must create one. For more information, see Creating a My VMware profile (2007005).

Navigate to the directory where vicfg-snmp.pl is stored. By default, vicfg-snmp.pl is located in:

C:\Program Files\VMware\VMware vSphere CLI\bin

Run this command:

vicfg-snmp.pl --server hostname --username username --password password --show

Note: Run the vicfg-snmp.pl --help command for a full list of options.

Specify the communities and trap targets with this command:

vicfg-snmp.pl --server hostname --username username --password password -t hostname@port/community

Note: In ESX 4.x or ESXi 5.0, you may need to use the -c community flag.

Example: To send SNMP traps from the host host.example.com, to port 162 on target.example.com, using the public community, use this command:

vicfg-snmp.pl --server host.example.com --username root --password password -t target.example.com@162/public

Note: To prevent clear text display of the user password, remove the --password password portion. You are then prompted to enter the password, and the entry is hidden.

To enable the SNMP service, run this command:

vicfg-snmp.pl --server hostname --username username --password password --enable

Note: To verify SNMP settings, run this command:

vicfg-snmp.pl --server hostname --username username --password password --show

(Optional) To send a test trap to verify that the agent is configured correctly, run this command:

vicfg-snmp.pl --server hostname --username username --password password --test

The test trap generated is a warmStart trap.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.