Skip to main content

Asterisk VoIP Server

Pack Assets​

Templates​

The Centreon Monitoring Connector Asterisk VoIP Server brings 1 host template:

  • App-VoIP-Asterisk-AMI-custom

It brings the following Service Templates:

Service AliasService TemplateService DescriptionDefault
Channel-UsageApp-Voip-Asterisk-AMI-Channel-UsageCheck number of calls and channelsX
Dahdi-StatusApp-Voip-Asterisk-AMI-Dahdi-StatusCheck status of dahdi lines
Sip-Peers-UsageApp-Voip-Asterisk-AMI-Sip-Peers-UsageCheck SIP peers usageX

Collected metrics & status​

Metric NameUnit
calls.active.countcount
calls.processed.countcount
channels.active.countcount
extcalls.active.countcount

Prerequisites​

Asterisk Manager Interface (AMI)​

In order to collect the necessary metrics and status, a user account with the "read" permission needs to be configured in the /etc/asterisk/manager.conf file. More information in the official documentation.

Setup​

  1. Install the Centreon package on every Centreon poller expected to monitor Asterisk resources:
yum install centreon-plugin-Applications-Voip-Asterisk-Ami
  1. On the Centreon Web interface, install the Asterisk VoIP Server Centreon Monitoring Connector on the Configuration > Monitoring Connector Manager page.

Configuration​

Host​

  • Log into Centreon and add a new Host through Configuration > Hosts.
  • Fill the Name, Alias & IP Address/DNS fields according to your Asterisk server settings.
  • Select the App-VoIP-Asterisk-AMI-custom template to apply to the Host.
  • Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
MandatoryMacroDescription
ASTERISKAMIEXTRAOPTIONSAny extra option you may want to add to every command_line (eg. a --verbose flag)
XASTERISKAMIPASSWORDAMI user password
ASTERISKAMIPORTAMI port
XASTERISKAMIUSERNAMEAMI user

How to check in the CLI that the configuration is OK and what are the main options for?​

Once the plugin is installed, log into your Centreon Poller CLI using the centreon-engine user account (su - centreon-engine) and test the Plugin by running the following command:

/usr/lib/centreon/plugins//centreon_asterisk_ami.pl \
--plugin=apps::voip::asterisk::ami::plugin \
--mode=channel-usage \
--ami-hostname='10.0.0.1' \
--ami-port='' \
--ami-username='' \
--ami-password='' \
--warning-channels-active='' \
--critical-channels-active='' \
--warning-calls-active='100' \
--critical-calls-active='200' \
--warning-calls-count='' \
--critical-calls-count='' \
--warning-extcalls-active='' \
--critical-extcalls-active='' \
--verbose \
--use-new-perfdata

The expected command output is shown below:

OK: channels active: 54 calls active: 73 external calls active: 5 calls count: 746 | 'channels.active.count'=54;;;0; 'calls.active.count'=73;0:100;0:200;0; 'extcalls.active.count'=5;;;0; 'calls.processed.count'=746;;;0;

This command would trigger a WARNING alarm if the number of active calls is reported as over 100 (--warning-calls-active='100') and a CRITICAL alarm if over 200than 50% (--critical-calls-active='200').

All available options for a given mode can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins//centreon_asterisk_ami.pl \
--plugin=apps::voip::asterisk::ami::plugin \
--mode=channel-usage \
--help

All available options for a given mode can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins//centreon_asterisk_ami.pl \
--plugin=apps::voip::asterisk::ami::plugin \
--list-mode

Troubleshooting​

Please find all the troubleshooting documentation for the Centreon Plugins in the dedicated page