Monitoring OpenSIPS using LibreNMS

LibreNMS is an open-source network monitoring tool. We can monitor a wide range of network devices such as Cisco, Juniper, Foundry, FreeBSD, Brocade, HP, different operating systems such as Linux, FreeBSD, Windows as well and pretty much anything that supports SNMP polling.

Its feature set includes automatic discovery, customizable alerts, API access, billing system for ports on the network, automatic updates and many more.

OpenSIPS is an Open Source carrier-grade SIP proxy/server used for SIP signalling and can handle all types of SIP operations. It’s being used by a lot of telco providers, ITSP and carriers because of its reliability and performance.

Installation


This tutorial assumes that you have OpenSIPS and LibreNMS installed and running. Here we will show you how to add OpenSIPS as an app in LibreNMS to monitor the memory usage, load and open files. If you not installed OpenSIPS or LibrenNMS yet, you can visit the following links : OpenSIPS, LibreNMS (on CentOS), LibreNMS (on Ubuntu) to get started and come back again on this tutorial when done installing. So these are the steps which we need to follow, to add OpenSIPS app in LibreNMS –

  1. Download opensips stats script
  2. Update snmpd.conf file

Step 1: Downloading the Script


First, we will download the script on the system where opensips is running

wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/opensips-stats.sh -O /etc/snmp/opensips-stats.sh 

We are also required to make the script executable. To make it executable we will use the chmod command

chmod +x /etc/snmp/opensips-stats.sh 

Next, we can verify that the script is working by executing it

 /etc/snmp/opensips-stats.sh 

You should see an output similar to the one shown above.

Step 2: Edit the snmpd.conf


With the script in place, we need to edit the main SNMP config file on OpenSIPS server.

nano /etc/snmp/snmpd.conf

We are required to add the following line in the snmpd.conf

extend opensips /etc/snmp/opensips-stats.sh  

After restarting the SNMPD service we should be good to go

systemctl restart snmpd

Now if we go to LibreNMS, you will be able to see the opensips application in the Apps tab of your host.

The following image shows the data collected and the graphs produced by the LibreNMS

We can see that the OpenSIPS app for LibreNMS is working properly. Along with this app, another app, called VoIP Monitor was contributed by our team which let’s you monitor the load usage and other stats of voip monitor. You should check that app as well. The following image shows the graphs produced by VoIP monitor app

To list out all supported apps in LibreNMS please check out this link and feel free to contribute to OpenSIPS and LibreNMS integration.


Thanks for reading. If you are facing any kind of problems or issues during the installation, feel free to use the comment section or contact us.

2 Replies to “Monitoring OpenSIPS using LibreNMS”

Leave a Reply

Your email address will not be published. Required fields are marked *