aws
❱
Monitoring Kamailio and Asterisk with AWS CloudWatch

Today I’m announcing the release to my new project VOIP Statistics to AWS CloudWatch (voip-mon-aws-cloudwatch), it is a monitoring script for Kamailio and Asterisk for AWS CloudWatch written in PHP.
This works similarly to AWS CloudWatch Monitoring Script (Linux).
Requirements
- PHP 5.5 and above
- Composer
- Asterisk
- Kamailio
Installation
-
Git clone to any Linux instance with Kamailio or Asterisk installed, for example to ~/home/ec2-user/ using
git clone https://github.com/rpfilomeno/voip-mon-aws-cloudwatch.git
-
Go to the project’s root directory by
cd ./voip-mon-aws-cloudwatch/
-
Make the mon-put-instance-data.php executable
sudo chmod +x mon-put-instance-data.php
-
Install Composer
curl -sS https://getcomposer.org/installer | php
-
Install the dependencies by
php composer.phar update
-
Create your aws credentials file
Usage
Monitoring Kamailio
-
Test the script for monitoring Kamailio with
./mon-put-instance-data.php stats --t kamailio
-
Install to Crontab with
crontab -e
*/5 * * * * php /home/ec2-user/voip-mon-aws-cloudwatch/mon-put-instance-data.php stats --s kamailio
Monitoring Asterisk
-
Test the script for monitoring Kamailio with
./mon-put-instance-data.php stats --t asterisk
-
Install to Crontab with
crontab -e
*/5 * * * * php /home/ec2-user/voip-mon-aws-cloudwatch/mon-put-instance-data.php stats --s asterisk