Edit the /etc/net-snmp/snmp/snmpd.conf SNMP configuration file to add the directives to define the trap, inform version, and destination.
You must use the pfedit command to edit the /etc/net-snmp/snmp/snmpd.conf file.
trapcommunity string --> define community string to be used when sending traps trapsink host[community [port]] --> to send v1 traps trap2sink host[community [port]] --> to send v2c traps informsink host[community [port]] --> to send informs
For more information, see the snmpd.conf(5) man page on the open source community web site http://www.net-snmp.org/docs/man/.
For example, the following directives use the public string as the community string when sending traps and indicate that the v1 traps are sent to the localhost destination:
trapcommunity public trapsink localhost
You must use the pfedit command to edit the /etc/net-snmp/snmp/snmpd.conf file.
The following example shows who is authorized to send traps (public) and how incoming traps should be processed (log,execute,net). See the snmptrapd.conf(5) man page on the open source community web site http://www.net-snmp.org/docs/man/.
authCommunity log,execute,net public
This example sends send both v1 and v2c traps to the SNMP trap daemon that runs on the same host. Update the /etc/net-snmp/snmp/snmpd.conf file with the following directives:
trapcommunity public trapsink localhost trap2sink localhost