[asterisk-dev] Send SNMP Traps
Matthew Jordan
mjordan at digium.com
Wed Jan 16 08:30:16 CST 2013
On 01/15/2013 03:21 PM, Meadows Hoa wrote:
> We would like to use SNMPv3 traps to send logging information to another
> server. It appears that Asterisk currently does not send SNMPv3 traps.
> Wondering if it would work to add a function into res_snmp.c that
> invokes the snmptrap command for invoking net-snmp trap utility to send
> that trap if the function also passes the necessary parameters?
>
> Any help on sending SNMPv3 Traps from Asterisk would be appreciated.
SNMPv3 support would certainly be doable but not exactly trivial, if for
no other reason than adding support for secure communication always ends
up being non-trivial.
Asterisk uses the well know net-snmp library, which does support SNMPv3
(see http://www.net-snmp.org/dev/agent/snmpv3_8h_source.html). As this
is a separate SNMP engine, res_snmp and it's corresponding units would
require some reasonable refactoring to support it correctly. You'd want
to make the engine configurable from res_snmp.conf. The agent_thread
would have to know which engine to initialize when started, and would
have to know how to shut it down.
Without investigating it more, I'm not sure if the existing table
registration methods are compatible with an SNMPv3 engine. If they are,
then the code modifications are limited to initialization/termination;
if not, then the scope expands dramatically.
In general, this is certainly doable and would be a nice improvement to
an extended support module, but would require some reasonable
development effort.
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-dev
mailing list