SNMP Configuration Asterisk 11

I am sorry it didn’t work out but I tried to guide you, good luck elsewhere

You didnt do anything Dicko other than be snoody in your remarks. Dont bother responding if you dont want to help.

is there someone else other than Dick that could help out here…

I have gone through the exact same instructions and cannot get any monitoring software to read SNMP other than a PING has anybody else had any luck?

Unfortunately it seems nobody wants to help. Unless I pony up and pay them.

I am definitely no SNMP guru but I am getting something by following that document…

I did have to play with the snmpwalk command given though…

By the way, I am running FreePBX 13/Asterisk 13…

Nick

re:

# snmpwalk -v 3 -u USER -a SHA -A AUTHPASS  -l authPriv -x AES -X ENCRYPTIONPASS 127.0.0.1 asterisk

ASTERISK-MIB::astVersionString.0 = STRING: 13.5.0
ASTERISK-MIB::astVersionTag.0 = Gauge32: 130500
ASTERISK-MIB::astConfigUpTime.0 = Timeticks: (154026) 0:25:40.26
ASTERISK-MIB::astConfigReloadTime.0 = Timeticks: (154026) 0:25:40.26
ASTERISK-MIB::astConfigPid.0 = INTEGER: 2416
ASTERISK-MIB::astConfigSocket.0 = STRING: /var/run/asterisk/asterisk.ctl
ASTERISK-MIB::astConfigCallsActive.0 = Gauge32: 0
ASTERISK-MIB::astConfigCallsProcessed.0 = Counter32: 0
ASTERISK-MIB::astNumModules.0 = INTEGER: 258
ASTERISK-MIB::astNumIndications.0 = INTEGER: 1
ASTERISK-MIB::astCurrentIndication.0 = STRING: us
ASTERISK-MIB::astIndIndex.1 = INTEGER: 1
ASTERISK-MIB::astIndCountry.1 = STRING: us
ASTERISK-MIB::astIndDescription.1 = STRING: United States / North America
ASTERISK-MIB::astNumChannels.0 = Gauge32: 0
ASTERISK-MIB::astNumChanTypes.0 = INTEGER: 14
ASTERISK-MIB::astChanTypeIndex.1 = INTEGER: 1
ASTERISK-MIB::astChanTypeIndex.2 = INTEGER: 2
ASTERISK-MIB::astChanTypeIndex.3 = INTEGER: 3
ASTERISK-MIB::astChanTypeIndex.4 = INTEGER

<snip>

I can also retrieve a specific one by replacing asterisk with one of the entries I got (OID?).

2 Likes

This helps me, can’t guarantee it will work for anyone/everyone:

Install SNMP RPMs in Linux CLI:

yum install -y net-snmp asterisk-snmp net-snmp-utils

#Then you’ll need to update /etc/snmp/snmpd.conf to work for Asterisk. Google will have to help with this one.

edit /etc/asterisk/res_snmp.conf
[general]
subagent = yes
enabled = yes

#enable snmpd on start up and start snmpd
chkconfig snmpd on
service snmpd start

#And then load snmp res:
asterisk -rx ‘module load res_snmp.so’

I am struggling to get this working on asterisk 13 glad to see someone else has gotten it going at least.

I followed a post associated with this and for the most part it all seems to have taken Compiling Asterisk with the res_snmp module - #7 by alan

If i walk SNMP from .1.3.6 i get everything so i know my auth is working on v3, however I can’t get it to respond as asterisk specifically. Any ideas?

I have the asterisk rmp installed so that’s out of the way.

yum install asterisk13-snmp.x86_64
Loaded plugins: fastestmirror, kmod
Setting up Install Process
Loading mirror speeds from cached hostfile
Package asterisk13-snmp-13.9.1-1.shmz65.1.115.x86_64 already installed and latest version
Nothing to do

xagent appears to be firing up so we got that

May 17 13:37:13 3cx snmpd[45868]: Turning on AgentX master support.
May 17 13:37:14 3cx snmpd[45871]: NET-SNMP version 5.5

I believe the MIB is loaded as well since SNMP does respond to requests for it

snmpwalk -v 3 -u USER -a SHA -A PASS -l authPriv -x AES -X KEY 127.0.0.1 astVersionString.0
ASTERISK-MIB::astVersionString.0 = No Such Object available on this agent at this OID

This doesn’t result in anything but an error for me unfortunatly. I think that may be the center of my issue… not sure?

asterisk -rx ‘module load res_snmp.so’
Unable to load module res_snmp.so
Command ‘module load res_snmp.so’ failed.

Thoughts?

Go to the console and enter "find / -name ‘res_*.so’ "

This will tell you where your res_* reloadables are. If res_snmp.so is not in the same directory as the rest of the resource drivers, you may have found your problem.

Sorry, the information I gave was based on the thread title for Asterisk 11.

With Asterisk 13 I have the same issue. I did some search but was not able to find a solution. If you go into the asterisk CLI and issue:

module load res_snmp.so

you will find there is more info on why it’s failing, specifically about a problem with compile-time options. I think this is something that needs to be addressed by the distro people as the RPM (asterisk13-snmp.x86_64) appears to not be correct.

Hi!

The res_snmp module is not (no longer?) present on the distro… It looks like the support for SNMP has not been compiled in…

This can only be addressed by the FreePBX developers, I suggest you open a ticket on http://issues.freepbx.org.

Good luck and have a nice day!

Nick

1 Like

A post was split to a new topic: Enable SNMP