Run 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:
esxcfg-firewall -e snmpd
. See Working with firewall rules in ESX 4.x (1021779).vicfg-snmp.pl
is stored. By default, vicfg-snmp.pl
is located in:C:\Program Files\VMware\VMware vSphere CLI\bin
vicfg-snmp.pl --server hostname --username username --password password --show
vicfg-snmp.pl --help
command for a full list of options.
vicfg-snmp.pl --server hostname --username username --password password -t hostname@port -c community
vicfg-snmp.pl --server hostname --username username --password password -t hostname@port/community
.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 -c public
vicfg-snmp.pl --server host.example.com --username root --password password -t target.example.com@162/community
--password password
portion. You are then prompted to enter the password, and the entry is hidden.vicfg-snmp.pl --server hostname --username username --password password --enable
vicfg-snmp.pl --server hostname --username username --password password --show
vicfg-snmp.pl --server hostname --username username --password password --test
warmStart
trap./etc/vmware/snmp.xml
. The ESX/ESXi SNMP agent log messages are saved in /var/log/syslog.log. For translated versions of this article, see: