Enabling SNMP Monitoring

Hi Everyone,

I have been searching around on the web (and these forums) for the past few days on how to enable SNMP on the distro to do basic system monitoring (CPU/DISK/Mem/Network/etc). At this point I’m not even really worried/concerned about Asterisk SNMP monitoring (although that will be the next step). I get that the distro is based on Schmooze/Centos/RedHat so in theory, simply searching for info on how to configure SNMP in any of those 3 distros should have revealed some decent information however all of my tests so far have failed.

I went on a bit of a tangent yesterday looking to figure out if maybe the firewall was blocking the SNMP ports or something like that… but after sitting down with my first coffee I’ve decided to simply ask… are there any distro specific instructions out there that clearly explain the process of setting up/configuring SNMP within the distro?

Thx
Ken

I should add… as an example of some of the stuff I’ve been looking into and trying to implement:

Google has lots of hits for how to configure SNMP in Centos… fewer for Schmoze… and anything related to FreePBX seems to be centered around Asterisk monitoring.

Anyways… any help/guidance is appreciated!

Ken

So… step one is to make sure you add the IP address of your SNMP monitoring system to the list of trusted systems in your firewall… X.X.X.X\32 (Replace X’s with your monitoring systems IP).

Ideally I would have preferred to just open up port 161 but at least this is a good first step.

OK - to start, you need to understand that while there are some changes that have been made to the larger “Asterisk” system in support of FreePBX, FreePBX is largely a management infrastructure for Asterisk, which is the base technology. There’s nothing that I can think of (specific to FreePBX) that would benefit from SNMP monitoring. Everything in the system that you would want to watch IS already Asterisk.

If it helps (and this is an oversimplification) think of FreePBX as a management Web Site. Yes, there are lots of details that FreePBX manages in the underlying Asterisk server, but it is still an Asterisk server.

Having said that - yes, you will need to set up a specific firewall rule for port 161 and your monitoring server. It’s really no different than adding TimeTrex to the server or adding Chan-SCCP-B (for Cisco phones in Skinny mode). It’s just another process running on the server dedicated to allowing you to connect to Asterisk in another way.

Now - integrating SNMP into FreePBX would look like any other page in the Admin tree. You’d update the parameters (R/O Realms, etc) and restart the service. Personally, I’d steer away from that - once you get SNMP running on the server, there shouldn’t be a lot of stuff that you need to do to keep it running. so dedicating space in the FreePBX Admin suite is probably overkill.

Hey Dave,

Thanks for the quick reply. I completely agree. As far as the monitoring, we’re mostly interested in simple UP/Down alert notifications and generic OS level stuff (CPU/Memory/Disk/Network/etc). Above this… some basic Asterisk stats and notices/warnings are desired (such was if the trunk is up/down, number of channels, peers, etc) but these are all secondary and more of a nice to have in one monitoring tool so we can alert on various conditions.

So with all of that, we use Observium for our monitoring solution here. I’ve managed to configure SNMP on the FreePBX system and add it to our monitoring server. As it happens, Observium has an Asterisk module for monitoring some stats which I have enabled. I’m just waiting for it to gather some stats to see if it’s going to meet our needs.

The final part that I am trying to configure is the syslog so I can forward the logs to a syslog server. Once all of this is configured, I need to then spend some time on learning how to configure the firewall to allow specific ports (instead of trusting an entire server). I admit I might have (incorrectly) expected to be able to configure some of this (SNMP settings, SYSLOG settings) from the FreePBX interface but it’s no big deal to use the command line.

Anyways… if you have any other suggestions please feel free to share and thanks again!

Ken

https://wiki.asterisk.org/wiki/display/AST/Asterisk+MIB+Definitions

but also try just adding a local agent for:-

https://mathias-kettner.de/check_mk.html ( A lovely nagios based frontend with “benefits”, (best you get agentx working though , so

https://www.voip-info.org/wiki/view/Asterisk+SNMP

IHAWFM)

Check out RMS http://www.sangoma.com/products/rms/