Supermon2 main page

Connection Logging in Supermon (and Supermon2)

So you want to know who is connecting to your node? Need to troubleshoot connection issues? Wouldn’t it be nice if your AllStar node logged all the connections to and from your node? We it can but it doesn’t do it by default, you have to turn it on.

Asterisk (that AllStar nodes are build on) does log connection issues but it is buried deep in the Asterisk logs. Who has time to look though all that logging just to find the connection / disconnection information you want? Good thing there is a better option…. Supermon. Supermon (and Supermon2) have the ability to create an easy to understand log of all the connections to and from your node, you just have to turn it on.

Enabling connection logging

The connection logging works by telling Asterisk to run a special script every time a node connects or disconnects. The script is part of Supermon and is added when you install Supermon (or Supermon2). In order to enable the logging, you will have to edit the rpt.conf file in /etc/asterisk and add in the following lines under your node stanza.

connpgm=/usr/local/sbin/supermon/smlogger 1
discpgm=/usr/local/sbin/supermon/smlogger 0

In my case, the above lines where in the file, just commented out. If that is the case, then just remove the comments.

Once you add the lines and save the file, you will have to restart asterisk to tell it to start logging. You can use the astres.sh script from the CLI or use option 13 from the admin menu. NOTE: when you restart, it will drop all connection that are not permanent.

/usr/local/sbin/astres.sh

Viewing the Connection Log

OK Now what? I have enabled it, how do I view all the connections? All the connection will now be logged to a file called: /var/log/asterisk/connectlog. From the CLI you can view this text file to see all the connections but viewing this file is not very convenient. Well, here is where Supermon comes in. There is a button on Supermon (once you are logged in) called connection log. When you click on it, you will get a popup showing all the connections.

Leave a Comment

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