Configure a Trap
Destination with vicfg-snmp
You can use
vicfg-snmp
to configure a trap destination and send traps.
Specify one of the options
listed in
Connection Options for vCLI Host Management Commands
in place of
<conn_options>
.
- Make sure a community is set up.vicfg-snmp <conn_options> --showCurrent SNMP agent settings: Enabled: 1 UDP port: 161 Communities: public Notification targets:
- Runvicfg-snmp --targetwith the target address, port number, and community.vicfg-snmp <conn_options> -t target.example.com@163/publicEach time you specify a target with this command, the settings you specify overwrite all previously specified settings. To specify multiple targets, separate them with a comma.You can change the port that the SNMP agent sends data to on the target using the--targetsoption. That port is UDP 162 by default.
- Enable the SNMP agent if it is not yet running.vicfg-snmp <conn_options> --enable
- Send a test trap to verify that the agent is configured correctly.vicfg-snmp <conn_options> --testThe agent sends awarmStarttrap to the configured target.