System information

syscontact Leif Madsen lmadsen@shifteight.org
Ctrl + D
The syslocation and syscontact lines are not necessary, but they can
make it easier to identify a particular server if you’re monitoring several
nodes.
Now we need to enable the AgentX subagent support so information about our Asterisk
system can be found:
$ sudo cat >> snmpd.conf
master agentx
agentXSocket /var/agentx/master
agentXPerms 0660 0775 nobody root
sysObjectID .1.3.6.1.4.1.22736.1
Ctrl
+ D
By adding the master agentx line and the agentX options, we’ve enabled Asterisk to
communicate with the SNMP daemon. The agentXPerms option is stating that Asterisk
is running as root. If your Asterisk system is running in a different group, change root
to the group that Asterisk is running as.
Just below the AgentX configuration, we added the sysObjectID option. The purpose
of adding the sysObjectID string is so OpenNMS will know that this host system is
running Asterisk, allowing it to dynamically grab additional graphing information.
Once you’ve performed these configuration steps, you need to restart the SNMP dae-
mon:
$ sudo /etc/init.d/snmpd restart
To verify that the information can be polled correctly, utilize the snmpwalk application:
$ snmpwalk -On -v2c -c public 127.0.0.1 .1.3.6.1.4.1.22736
You should get several lines of information flowing across your screen if your config-
uration is correct, much like the following:
.1.3.6.1.4.1.22736.1.5.4.1.4.3 = INTEGER: 2
.1.3.6.1.4.1.22736.1.5.4.1.4.4 = INTEGER: 2
.1.3.6.1.4.1.22736.1.5.4.1.4.5 = INTEGER: 1
.1.3.6.1.4.1.22736.1.5.4.1.4.6 = INTEGER: 1
.1.3.6.1.4.1.22736.1.5.4.1.5.1 = INTEGER: 1
...etc
At this point your host system should be ready for OpenNMS to connect and gather
the information it needs. Proceed by adding a node to the system and filling in the
appropriate information. After a period of time, OpenNMS will poll the host system
554 | Chapter 24:System Monitoring and Logging