Specifications
Updates for the Basic Administration Guide
Update–4 VMware, Inc.
To configure an ESX host for SNMP Traps
1LoginasroottotheserviceconsoleoftheESXhost.
2Runthefollowingcommandtoeditthesnmp.xmlfile:
vi /etc/vmware/snmp.xml
3 Updatethesnmp.xmlfilewiththefollowingtext:
<config>
<snmpSettings>
<communities>public</communities>
<enable>true</enable>
<port>99</port>
<targets>localhost@162 private</targets>
</snmpSettings>
</config>
4Runthefollowingcommandtoedittheconfig.xmlfile:
vi /etc/vmware/hostd/config.xml
5 Updatetheconfig.xmlfilewiththefollowingtext:
<log>
<directory>/var/log/vmware/</directory>
<name>hostd</name>
<outputToConsole>false</outputToConsole>
<level>verbose</level>
</log>
6Restarthostdusingthefollowingcommand:
service mgmt-vmware restart
7Runthefollowingcommandstoverifythatthesnmpdandsnmptrapdarerunning
successfully:
etc/initd/snmpd status
etc/initd/snmptrapd status
Ifthestatusisdisplayedasstopped,startthedaemons:
etc/initd/snmpd start
etc/initd/snmptrapd start
Tomonitorandreceivethegeneratedtraps,enterthefollowingcommands:
# snmpd -P
# snmptrapd -P