System information
$ cd /usr/src/asterisk-complete/asterisk/1.8/
$ ./configure
$ make menuselect # verify that res_snmp is selected under Resource Modules
$ sudo make install
You then need to copy the sample config file over to the /etc/asterisk folder:
$ sudo cp /usr/src/asterisk-complete/asterisk/1.8/configs/res_snmp.conf.sample \
/etc/asterisk/res_snmp.conf
We’ll talk about configuring this file for use with OpenNMS in the next section.
Configuring SNMP for Asterisk Using OpenNMS
The OpenNMS project provides an open-source network management platform that
has Asterisk support built right in. There are a few steps that must be taken to enable
this support, though. In this section we’ll take you through what you need to do to get
your Asterisk server talking to OpenNMS.
Installing OpenNMS
The OpenNMS wiki has detailed instructions for installing OpenNMS, which you can
find at http://opennms.org/wiki/Installation:Yum.
OpenNMS should normally not be installed on your Asterisk server.
You will want to designate a separate machine as your OpenNMS server.
Since the OpenNMS wiki provides all the required instructions, we’ll leave it to the
experts to lead you through the first part of the installation. Once you’ve installed
OpenNMS, come back here and we’ll take you through how to configure it to work
with Asterisk.
The instructions for installing OpenNMS on the wiki use SNMPv2c, which is not a
secure method of abstracting data from the SNMP protocol. Since we want to build a
secure system, our instructions will show you how to enable SNMPv3 support.
‖
However, because SNMPv3 can be a bit of an unwieldy beast, and because you may
not wish to enable SNMPv3 for some reason (e.g., if your version of SNMP was not
compiled with OpenSSL support), we will provide instructions for configuring the
SNMP daemon for both SNMPv2c and SNMPv3.
It tends to be easier to configure the system for SNMPv2c first and then update it to
SNMPv3, as the steps to get SNMPv3 set up properly are more complex.
‖ Additionally, you can find a blog post on enabling SNMPv3 for OpenNMS at http://www.opennms.org/wiki/
SNMPv3_protocol_configuration.
552 | Chapter 24: System Monitoring and Logging