-
Notifications
You must be signed in to change notification settings - Fork 0
aiqui/cloudwatch-watchdog
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
There are two Python programs here for monitoring systems with custom parameters in CloudWatch: 1. monitor_server - monitor for memory and disk usage 2. website_watchdog - monitor HTTP content To prepare for these to work: 1. set up AWS CloudWatch 2. Install Python boto, e.g. yum install python27-boto Monitor Server Program This program will: - Run on a Linux server, preferably AWS Linux AMI - Written in Python using AWS Boto library - Get the RAM usage - Get the swap usage - Get the disk usage for a variable number of attached storage devices - Store each of these values into CloudWatch - Use a simple configuration file - Optionally run using the EC2 role instead of AWS access ID and secret key To run this program: 1. Copy config.ini.template to config.ini 2. Add a custom namespace for the server you are monitoring 3. If not using an EC2 role, add the access ID and secret key 4. Modify the disk metrics for each of the disks to monitor 5. Run on the server to test 6. Once working, run this in a cron job Website Watchdog This tiny program is a watchdog for websites that will post the results to AWS CloudWatch for monitoring and alarms. This assumes the website is available and containing something constant that can be matched. To run this watchdog program you'll need to: - Get a list of your servers IDs - For each server to monitor , find a stable URL and grab a small snippet of that page - Configure each of the constant elements below - Run the program and see if it is posting correctly to CloudWatch - Monitor the log file if needed (e.g. tail -f /var/log/httpd/website_watchdog.log) - If all is good, set up any alarms in CloudWatch for these custom metrics
About
Programs for montoring servers with AWS CloudWatch
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published