Monitoring Asterisk
Asterisk is a free and open source framework for building communications applications. This plugins allows you to monitor calls as well as incoming calls.
Calls
Incoming calls
The nixstats user needs sudo access to run sudo asterisk. Open /etc/sudoers and append the following at the end of the file.
This is considering exim is install in /usr/sbin/asterisk you can locate where asterisk is installed by running `whereis asterisk`
Now open /etc/nixstats.ini and append the following lines at the end of the file.
Run su -p nixstats then run nixstatsagent test asterisk the following to see if everything is installed correctly.
If the test is successful you can restart the agent to start sending data to Nixstats.
Click on the Metrics link on the top menu, now select "asterisk" as metric type and calls as metric, choose the servers you would like to graph and save it to your dashboard.
Asterisk Mail Queue Size Metrics
Calls
Incoming calls
Installing the Asterisk Plugin
The nixstats user needs sudo access to run sudo asterisk. Open /etc/sudoers and append the following at the end of the file.
nixstats ALL=(ALL) NOPASSWD: /usr/sbin/asterisk
This is considering exim is install in /usr/sbin/asterisk you can locate where asterisk is installed by running `whereis asterisk`
Now open /etc/nixstats.ini and append the following lines at the end of the file.
[asterisk]
enabled = yes
Testing the asterisk plugin
Run su -p nixstats then run nixstatsagent test asterisk the following to see if everything is installed correctly.
root@nixstats:~# su -p nixstats
nixstats@nixstats:~# nixstatsagent test asterisk
asterisk:
{
"calls": 0,
"incomingcalls": 0
}
If the test is successful you can restart the agent to start sending data to Nixstats.
service nixstatsagent restart
Create an asterisk chart
Click on the Metrics link on the top menu, now select "asterisk" as metric type and calls as metric, choose the servers you would like to graph and save it to your dashboard.
Updated on: 04/09/2018
Thank you!