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.
Note also that you typically only want one of the settings:
trapsink localhost trap2sink localhost informsink localhost
Including two (or all three) of these lines in the snmpd.conf file will
will result in multiple copies of every notifications being sent for each call to
send_easy_trap()
(or send_v2trap()
).
This is probably not what was intended!