Template:FAQ:Agent 17
With all these alerts, the agent also needs to be told where to send them,
specifying the type of notification (v1 or v2 trap, or v2 inform) and
the community name to use. This uses the snmpd.conf directives 'trapsink', 'trap2sink'
and
'informsink'
for the destination type, and 'trapcommunity'
for the
community name. SNMPv3 destinations can be configured using the directive
'trapsess'
. See the 'snmpd.conf(5)'
man page for details.
Note that the type of trap generated is totally determined by these directives - irrespective of which API call was used to trigger sending the trap. See the trap-related entries in the CODING section for details.
A configuration block such as
trapsink localhost trap2sink localhost informsink localhost
will result in three notifications being sent for each call to
'send_easy_trap()'
(or 'send_v2trap()'
).
Probably not what was wanted!