fauguste / cloudwatch-script-php
PHP script for cloud watch metrics ans alarms generation
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 5
Open Issues: 0
Type:project
Requires
- aws/aws-sdk-php: 3.14.2
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
README
Amazon CloudWatch Monitoring Scripts for EC2 Instance
This project provide some scripts in order to monitor your EC2 instances with CloudWatch.
You can add your own scripts in the plugin directory.
Requirements
This libraries are required for this project :
# Using PHP5
php5-cli, php5-curl
# Using PHP7
php-cli, php-curl
Configuration
Authorize this policy :
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1446055544000",
"Effect": "Allow",
"Action": [
"cloudwatch:PutMetricAlarm",
"cloudwatch:PutMetricData",
"cloudwatch:DeleteAlarms"
],
"Resource": [
"*"
]
}
]
}
Using IAM roles
'profil':'YOUR_PROFIL',
Using credentials
Add your key and secret in the config file.
'key':'YOUR_KEY',
'secret':'YOUR_SECRET',
Usage
Send metrics to CloudWatch (Run every 5 minutes)`
php metrics.php [-f config-file]
Create alarms in CloudWatch (Run one time)
php alarmes.php [-f config-file]
Delete alarms in CloudWatch (Run one time)
php delete-alarmes.php [-f config-file]
Plugins
License
This application licensed by Apache License Version 2.0.