Include Asterisk SNMP MIBs in build by default

tmo

Guru
Joined
May 17, 2008
Messages
10
Reaction score
0
It seems that all the piaf versions do not include asterisk snmpd support. This is rather unfortunate as it requires one to rebuild asterisk at each update if the functionality is desired.

CLI> module show like snmp
Module Description Use Count
0 modules loaded

looks like other flavors are mostly built "–with-snmp" ...

Please consider this.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
Can someone who has done it document the steps necessary? That'll save a bunch of time. Thanks.
 

tmo

Guru
Joined
May 17, 2008
Messages
10
Reaction score
0
Happy New Year to all.

When I get back in the office, I will more than gladly provide a step by step ;)
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
For those that are not aware, SNMP v1 is a security risk as the only "authentication" is via a clear text community name that can easily be sniffed. So normally, SNMP v1 is only used for monitoring.

SNMPv2 combined the RMON (Remote Network Monitoring) MIB definition and Secure SNMP. Secure SNMP provides strong authentication and privacy mechanisms suitable for network management in a generally open environment.

In addition, SNMPv2 was extended to address the concerns over protocol efficiency and safety (acknowledgements of Trap). Two new protocol functions (PDUs) were added (GetBulk and Inform Request) to allow efficient reading of tables and provide reliable communications.

NOTE: SNMPv1 and SNMPv2 do not interoperate. The two versions must be translated to communicate with each other.
 

tmo

Guru
Joined
May 17, 2008
Messages
10
Reaction score
0
Current builds will require rebuiling with snmp modules, ie: "./configure –with-net-snmp" support enabled.

then, it's a simple matter of getting asterisk and snmp setup to use the mibs:

cp /usr/src/asterisk/doc/asterisk-mib.txt /usr/share/snmp/mibs/ASTERISK-MIB.txt
cp /usr/src/asterisk/doc/digium-mib.txt /usr/share/snmp/mibs/DIGIUM-MIB.txt
mkdir /var/agentx
touch /var/agentx/master
chown -R asterisk:asterisk /var/agentx
cp /etc/asterisk/res_snmp.conf.save /etc/asterisk/res_snmp.conf

Add the following lines to /etc/snmp/snmpd.conf:

master agentx
agentXperms 0660 0550 asterisk asterisk

Then restart snmpd and asterisk. Once complete, you can test it out using:

export MIBS=+ASTERISK-MIB
snmpget -v2c -c public localhost 1.3.6.1.4.1.22736.1.5.1.0
 

Members online

Forum statistics

Threads
25,810
Messages
167,754
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top