Configuring
The System To Send Traps To A Management Station Using The vSphere
CLI
Server Administrator generates SNMP traps in response to
changes in the status of sensors and other monitored parameters. One
or more trap destinations must be configured on the system running
Server Administrator to send SNMP traps to a management station.
Configure
the ESXi system running Server Administrator to send traps to a management
station:
Install the VMware vSphere CLI.
Open a command prompt on the system in which the vSphere
CLI is installed.
Navigate to the directory in which the vSphere CLI is installed.
The default location on Linux is /usr/bin and
on Windows is C:\Program Files\VMware\VMware vSphere CLI\bin.
Configure the SNMP setting using the command: vicfg-snmp.pl
--server <server> --username <username> --password
<password> -c <community> -t <hostname>@162/<community>
where <server> is the hostname or IP address of the
ESXi system, <username> is a user on the ESXi system, <password> is the password of the ESXi user, <community> is the SNMP community name and <hostname> is the hostname
or IP address of the management station.
NOTE: If you do not specify
a user name and password, you are prompted to specify the same.
Enable SNMP using the command: vicfg-snmp.pl --server
<server> --username <username> --password <password> -E
View the SNMP configuration using the command: vicfg-snmp.pl --server <server> --username <username> --password <password> -s
Test the SNMP configuration using the command: vicfg-snmp.pl --server <server> --username <username> --password <password> -T
NOTE: The .pl extension is not required if you are using vSphere CLI on
Linux or using vMA.
The SNMP trap
configuration takes effect immediately without restarting any services.