VMware

VMware ESX Server 2.0

Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Introduction to Simple Network Management Protocol

Introduction to Simple Network Management Protocol

Simple network management protocol (SNMP) is a communication protocol between the SNMP client (for example, a workstation) and the SNMP agent (management software that executes on a remote device including hosts, routers, X terminals, and so on). The SNMP client queries the SNMP agent, that provides information to the client regarding the device's status. The SNMP agent controls a database called the SNMP Management Information Base (MIB), a standard set of statistical and control values. SNMP allows the extension of these standard values with values specific to a particular device.

Using SNMP to Monitor the Computer Running ESX Server

Using SNMP to Monitor the Computer Running ESX Server

ESX Server ships with an SNMP agent that allows you to monitor the health of the physical machine where ESX Server is running and of virtual machines running on it. This agent is based on Net-SNMP with enhancements to support data specific to ESX Server. Background information on Net-SNMP is available at net-snmp.sourceforge.net.

The ESX Server SNMP agent can be used with any management software that can load and compile a management information base (MIB) in SMIv1 format and can understand SNMPv1 trap messages.

The location of the VMware subtree in the SNMP hierarchy is .iso.org.dod.internet.private.enterprises.vmware (.1.3.6.1.4.1.6876).

You can choose to use SNMP with or without any specific ESX Server MIB items.

Information about the Physical Computer

Information about the Physical Computer

SNMP get variables allow you to monitor a wide variety of items about the physical computer and how virtual machines are using its resources. Some of the key types of information available are:

  • The number of CPUs on the physical computer
  • CPU resources on the physical computer being used by particular virtual machines
  • The amount of RAM installed on the physical computer
  • Physical memory used by the service console
  • Physical memory used by particular virtual machines
  • Physical memory that is not being used
  • Usage data for disks on the physical computer, including number of reads and writes and amount of data read and written
  • Usage data on the physical computer's network adapters, including packets sent and received and kilobytes sent and received
  • State of the VMkernel (loaded or not loaded)

    Note: If the variable showing whether the VMkernel is loaded says no, any values reported for any other variable should be regarded as invalid.

Information about the Virtual Machines

Information about the Virtual Machines

SNMP get variables allow you to monitor a number of items about particular virtual machines running on the computer. Some of the key types of information available are:

  • The path to the virtual machine's configuration file
  • The guest operating system running on the virtual machine
  • The amount of memory the virtual machine is configured to use
  • The state of the virtual machine's power switch — on or off
  • The state of the guest operating system — on or off (running or not running)
  • What disk adapters are seen by the virtual machine
  • What network adapters are seen by the virtual machine
  • What floppy disk drives are seen by the virtual machine
  • The state of the floppy drive — connected or disconnected
  • What CD-ROM drives are seen by the virtual machine
  • The state of the CD-ROM drive — connected or disconnected

Note: SNMP information is provided for virtual machines if their configuration files are stored locally on the ESX Server computer. If the configuration files are stored on an NFS-mounted drive, information for the virtual machines does not appear in the SNMP tables.

SNMP Traps

SNMP Traps

Four SNMP traps notify you of critical events in particular virtual machines. The affected virtual machine is identified by ID number and configuration file path. The traps notify you

  • When a virtual machine is powered on
  • When a virtual machine is powered off
  • When the virtual machine detects a loss of heartbeat in the guest operating system
  • When the virtual machine detects that the guest operating system's heartbeat has started or resumed

Note: VMware Tools must be installed in the guest operating system to support the traps that detect loss and resumption of the guest's heartbeat.

Note: Traps are not generated immediately when virtual machines are registered using the VMware Management Interface. To enable trap generation, you must restart vmware-serverd. You may restart vmware-serverd by rebooting the server or by logging in to the service console as root and issuing the command

killall -HUP vmware-serverd

Setting Up VMware ESX Server SNMP

Setting Up VMware ESX Server SNMP

ESX Server 2.0 includes two daemons, a master (snmpd) and a subagent (vmware-snmpd), as illustrated in the following diagram. The master snmpd daemon is either the default snmpd daemon shipped with ESX Server or a third party SNMP application daemon. The subagent vmware-snmpd exports ESX Server MIB information to the master, that communicates directly with the SNMP client application.

Installing the ESX Server SNMP Agents

Installing the ESX Server SNMP Agents

The default master snmpd daemon and the VMware-specific vmware-snmpd daemon are automatically installed when you install ESX Server.

If you want to see ESX Server MIB items, then you must configure the ESX Server SNMP subagent (vmware-snmpd). If you aren't interested in ESX Server-specific SNMP items, then you do not configure vmware-snmpd.

Configure the ESX Server SNMP subagent after you have installed and configured ESX Server through the VMware Management Interface. You can configure the ESX Server SNMP subagent by using a script or through the VMware Management Interface.

Depending on your preference, complete one of the following:

Then, configure your SNMP trap destinations. See Configuring SNMP Trap Destinations.

Configuring the ESX Server Agent through the VMware Management Interface

Configuring the ESX Server Agent through the VMware Management Interface

To configure the ESX Server SNMP subagent, complete the following steps.

  1. Log in to the VMware Management Interface as root.

    The Status Monitor page appears.

  2. Click the Options tab.

    The Options page appears.

  3. Click SNMP Configuration.

    The options in this page act as toggle between two choices. To change an option, click the link.

  4. Make sure the paths to the snmpd daemon startup script and its configuration file are correct. If either of these is incorrect, then click Change and type the correct path.
  5. Make sure that the status of the master SNMP agent is Running.
  6. If you're interested in VMware-specific SNMP MIBs, then make sure the status and VMware traps of the VMware SNMP subagent is Enabled.
  7. Optional: If you want the master SNMP agent (and the VMware SNMP subagent, if its status is Enabled) to start automatically upon booting, then make sure the Startup Type is Automatic.
  8. Configure your traps. See Configuring SNMP Trap Destinations.
Configuring the ESX Server Agent from the Service Console

Configuring the ESX Server Agent from the Service Console

Use the snmpsetup.sh script to configure the ESX Server SNMP subagent to work with the default snmpd or with a third party management application, including Dell OpenManage 3.2 or HP Insight Manager.

Note: If you're not interested in VMware-specific SNMP modules, then you shouldn't run this script. This script sets up a connection, between the master snmpd daemon and the vmware-snmpd daemon, which enables access to ESX Server MIB items.

Caution: Do not use the snmpsetup.sh script to set up third-party SNMP daemons.

Using the VMware SNMP Daemon with the Default SNMP Daemon

Using the VMware SNMP Daemon with the Default SNMP Daemon

  1. Log into the service console as the root user and run the script as follows.
  2. Type the following

    snmpsetup.sh default

    The default option sets up the snmpd.conf file for the default master SNMP daemon. This connects snmpd to vmware-snmpd, enabling you to query for ESX Server MIB items.

  3. The script then starts both the master and subagent SNMP daemons.
Using the VMware SNMP Daemon with Third Party Management Applications

Using the VMware SNMP Daemon with Third Party Management Applications

  1. Install your third party management application. Refer to your management application documentation and the ESX Server release notes at www.vmware.com/support/esx2/doc/releasenotes_esx2.html.
  2. Log into the service console as the root user and run the script as follows.
  3. Type the following:

    snmpsetup.sh connect

    The connect option configures exporting ESX Server MIB items through your third party SNMP daemon. You should use this option if you want to enable the export of ESX Server MIB items after installing the third party management application.

    The script connects the third party application snmpd daemon with the vmware-snmpd subagent daemon.

  4. The script then starts both daemons.
Starting the SNMP Agents Automatically

Starting the SNMP Agents Automatically

You can set the master and subagent SNMP daemons to start automatically whenever ESX Server boots by logging in as the root user in the service console and running the chkconfig commands:

chkconfig snmpd on
chkconfig vmware-snmpd on

The first command enables starting the master SNMP daemon (either the default SNMP daemon shipped with ESX Server or your third party management application SNMP daemon) on boot.

The second command enables starting the subagent vmware-snmpd daemon on boot.

Note: The master snmpd daemon can run by itself or together with the subagent vmware-snmpd daemon. However, the subagent daemon cannot run alone.

Starting the SNMP Agents Manually

Starting the SNMP Agents Manually

If you need to start the SNMP agents manually, log in as root in the service console and run the following commands:

/etc/rc.d/init.d/snmpd start
/etc/rc.d/init.d/vmware-snmpd start

The first command starts the master SNMP daemon (either the default SNMP daemon shipped with ESX Server or your third party management application SNMP daemon).

The second command starts the subagent vmware-snmpd daemon.

By default, the agents start and run as background processes.

Note: As described previously, the master snmpd daemon can run by itself or together with the subagent vmware-snmpd daemon. However, the subagent daemon cannot run alone.

Configuring SNMP Trap Destinations

Configuring SNMP Trap Destinations

Currently, you cannot configure trap destinations through the VMware Management Interface. To configure traps, log into the service console as the root user and modify the /etc/snmp/snmpd.conf file as follows:

  1. Using a text editor, add the following line, replacing mercury.solar.com with the name of the host on your network that will receive traps. You may repeat this line to specify more than one destination.

    trapsink mercury.solar.com

  2. Add the following line, replacing public with a community name of your choice. There can only be one instance of this line.

    trapcommunity public

  3. Save your changes.
Configuring SNMP Management Client Software

Configuring SNMP Management Client Software

To use your SNMP management software with the ESX Server agent, take the normal steps needed to accomplish the following:

  • In your management software, specify the ESX Server machine as an SNMP-based managed device.
  • Set up appropriate community names in the management software. These must correspond to the values set in the master SNMP agent's configuration file, for example, rocommunity, trapcommunity and trapsink.
  • Load the ESX Server MIBs into the management software so you can view the symbolic names for the ESX Server variables. You can find the MIB files on VMware ESX Server, in the /usr/lib/vmware/snmp/mibs directory.

previous Prev   Contents   Last   Next next