Template:FAQ:Agent 17

From Net-SNMP Wiki
Revision as of 22:00, 22 October 2006 by Dts12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

With all these alerts, the agent also needs to be configured with (one or more) destinations to send them to, 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 these directives control the type of notification that is generated. This is completely separate from the style of API used to request that the notification should be sent. If a module invokes the v1-style API 'send_easy_trap', this will still send SNMPv2 notifications to destinations configured using 'trap2sink' or 'informsink' (and vice versa).

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'). See 'snmp_trap_api(3)' for details.

Note that all notifications will be sent to all destinations. The agent does not (currently) support notification filtering.