Asterisk 1.6 and newer has the ability to be monitored via SNMP, but the FreePBX 2.10 distro, which I have, doesn’t have the res_snmp module compiled into it. I have two questions about this:
Can future releases of the distro include the res_snmp module?
How do we add the res_snmp module to existing distro installations?
Guys all 3 of our Asterisk versions have the snmp RPM. Do a yum list all | grep asterisk from your box and you will see it. Then you can yum install it.
oliverm, I did not find a solution to getting the res_snmp module into FreePBX. I would still like to be able to monitor server usage directly via SNMP.
alan_mousty is right. The problem is the missing res_snmp module in FreePBX, not SNMP at the OS layer.
I’ve installed the Asterisk 8 RPMs using the yum list all | grep asterisk | grep snmp command and it installed ok.
However using the Asterisk MIBs on the Asterisk wiki, I dont see any of the asterisk OIDs showing. I assumed there was some other bit that needed to be done.
Here is my raw unedited cheat sheet for Asterisk snmp. Most of this is done by the RPM via yum but hopefully it will help:
cd /etc/snmp
ls
cp /usr/src/asterisk-1.6.2.17.2/doc/*-mib.txt /usr/share/snmp/mibs/
chkconfig snmpd on
ls -al /var/agentx
service snmpd start
ls -al /var/agentx
chmod 755 /var/agentx
ls -al /var/agentx
service snmpd restart
service asterisk restart
snmpwalk -On -c community -v 2c localhost .1.3.6.1.4.1.22736
If not res_snmp.so cure the following dependencies:
Asterisk SNMP support is provided by the res_snmp module. To build this module, you need to install the following packages:
Other people say I need /etc/asterisk/res_snmp.conf but it isn’t there and if I make it myself it still does not work.
When I do a SNMP walk I get the following.
No log handling enabled - turning on stderr logging
Cannot find module (DIGIUM): At line 0 in (none)
SNMPv2-SMI::enterprises.22736 = No Such Object available on this agent at this OID
We generally do not allow links back to other sites from the forums. Can we give you access to add information to wiki.freepbx.org and would you be ok posting this their?
That directory should get created after adding the code to snmp.conf file and restarting it. I updated the blog post. As for the stats I am getting back there are quite a few, however the system I set it up on has not gone into production yet so I can’t say which will be useful. Below are some of them, there were also ones for trunk types like SIP AIX etc but those didn’t seem to have much useful information.
I am going to be redoing the server I used before to write the article so I will follow my blog post and update it as needed.