System information

SNMP
The Simple Network Management Protocol (SNMP) is a standardized protocol for
network management. It is very commonly used and implemented across many appli-
cations and network devices. Platforms such as OpenNMS,
§
an open source network
management platform, use SNMP (among other things). Asterisk supports SNMP
through the res_snmp module. This section discusses the installation and configuration
of res_snmp, as well as how it can be utilized by a platform like OpenNMS.
Installing the SNMP Module for Asterisk
By default, Asterisk will not compile the SNMP development module, since a depend-
ency needs to be satisfied first.
CentOS dependency
In CentOS, you simply need to install the net-snmp-devel package:
$ sudo yum install net-snmp-devel
See the upcoming section “Recompiling Asterisk with the res_snmp mod-
ule” on page 551 for a description of how to recompile Asterisk with SNMP support.
Ubuntu dependency
Under Ubuntu, the following package needs to be installed:
$ sudo apt-get install snmp libsnmp-dev snmpd
Both the snmp and snmpd packages need to be installed explicitly on
Ubuntu, as they are not dependencies of the SNMP development libra-
ries, like they are on CentOS. The snmp package installs SNMP tools
like snmpwalk that we’ll need, and the snmpd package installs the SNMP
daemon.
See the next section for a description of how to recompile Asterisk with SNMP support.
Recompiling Asterisk with the res_snmp module
Once you’ve satisfied the dependencies for SNMP, you can recompile Asterisk with
SNMP support:
§ OpenNMS is certainly not the only platform that could be used with the res_snmp module. However, we
chose to discuss it here for a number of reasons. First, OpenNMS is a very good network management
platform that has Asterisk-specific integration. Second, it’s open source and 100% free. Lastly, Jeff Gehlbach
of OpenNMS has contributed to the development of Asterisk, most notably making significant improvements
to the SNMP support. He was also nice enough to help us get all of this stuff working so that we could
document it.
SNMP | 551