Asterisk can be monitored using SNMP. It includes a resource called res_snmp.
An article about configuring and installing SNMP can be found on Voxilla: How To: Monitor Asterisk with SNMP
Monitoring Asterisk 1.4 with SNMP and CACTI for pretty graphs!
For Asterisk version 1.8.x you can follow the Voxilla article but you will have to download the mib definition files from the Asterisk wiki because they are no longer included in the asterisk source tar file. (Asterisk mib definition,Digium mib definition)
Copy and paste the content of the two wiki pages into a new file (asterisk-mib.txt and digium-mib.txt) and save them in the /usr/share/snmp/mibs directory on your server. After installing the files you will have to restart your snmp daemon.
An article about configuring and installing SNMP can be found on Voxilla: How To: Monitor Asterisk with SNMP
Monitoring Asterisk 1.4 with SNMP and CACTI for pretty graphs!
For Asterisk version 1.8.x you can follow the Voxilla article but you will have to download the mib definition files from the Asterisk wiki because they are no longer included in the asterisk source tar file. (Asterisk mib definition,Digium mib definition)
Copy and paste the content of the two wiki pages into a new file (asterisk-mib.txt and digium-mib.txt) and save them in the /usr/share/snmp/mibs directory on your server. After installing the files you will have to restart your snmp daemon.
PHP SNMP Asterisk libraries and GUIs
- OSS_SNMP is a PHP SNMP library for people who HATE SNMP, MIBs and OIDs! It includes a complete Asterisk SNMP interface (API documentation) with an example here.
- NOCtools is a mixed bag collection of tools and utilities for NOC engineers (PHP web interface) with some Asterisk tool(s) including a wall board as a proof of concept use of the Asterisk MIBs in OSS_SNMP above. You can review it here with screenshots.
On Debian (Squeeze)
* Download the asterisk source tar file
* apt-get install libsnmp-dev
* apt-get install snmp (if you want to check if snmpd is working allright)
* apt-get install snmpd
* apt-get install snmp-mibs-downloader
* ./configure --prefix=/usr
* make menuselect
** Go into option "Resource Modules"
** Make sure option res_snmp is marked ([[*] res_snmp)
** Save and quit (x)
* make
* make install
* make config
* Edit file /etc/asterisk/res_snmp.conf and set options enable and subagent options (in general section) to yes
* Start asterisk
** #> /etc/init.d/asterisk start
* Connect to console and check if the SNMP resource is loaded:
** #> asterisk -rv
** ast*CLI> module show like snmp
Module Description Use Count
res_snmp.so SNMP [Sub]Agent for Asterisk 0
1 modules loaded
** if you see the above with 1 modules loaded then everything is working allright.
** if you do not see the above check the output of your ./configure and see if it can find the net-snmp header files.
* Configure snmpd so Asterisk can connect to it
** Edit the file /etc/snmp/snmpd. ...