Users Guide

Setup and Administration 39
1
Edit the VMWare SNMP configuration file,
/etc/vmware/snmp.xml
, either
manually or run the following vicfg-snmp commands to modify the SNMP
configuration settings. This includes the SNMP listening port, community
string, and the trap target ipaddress/port and trap community name and
then enable the VMWare SNMP service.
a vicfg-snmp.pl --server <ESX_IP_addr> --username
root --password <password> -c <community name>
-p X –t <Destination_IP_Address>@162/<community
name>
Where X represents an unused port. To find an unused port, check the
/etc/services
file for the port assignment for defined system services. Also,
to make sure that the port selected is not currently being used by any
application/service, run the following command on the ESX server:
netstat –a command
NOTE: Multiple IP addresses can be entered using a comma-separated list.
b
To enable VMWare SNMP service, run the following command:
vicfg-snmp.pl --server <ESX_IP_addr> --username
root --password <password>
-E
c
To view the configuration settings, run the following command:
vicfg-snmp.pl --server <ESX_IP_addr> --username
root --password <password>
-s
After modification, the configuration file looks like this:
<?xml version="1.0">
<config>
<snmpSettings>
<enable>true</enable>
<communities>public</communities>
<targets>143.166.152.248@162/public</targets>
<port>167</port>
book.book Page 39 Tuesday, March 6, 2012 6:13 PM