Skip to content

Create a Trello workflow using your Amazon Web Services (AWS) Elastic Load Balancer (ELB) Logs. You may modify this to process standard Apache Logs as well.

License

Notifications You must be signed in to change notification settings

rjstech2020/awslogstrelloworkflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

About this script

This is a simple script for improving error handling of your web service hosted on Amazon Web Services using Elastic Load Balancers. Here's how it works:

  • Download the AWS ELB logs from the S3 bucket.
  • Parse the log files and find out exceptions based on user defined parameters.
  • Create Trello cards for the exceptions [execution time, 404 & 500 errors].
  • In case card already present, add the exception as a comment.
  • In case card was marked as "Completed", transfer it to a "Redo" list.
  • Add the card to the developer who is going to fix it.

This script can be easily modified for any Apache log based on your requirements.

Enable Access Logs

To get AWS reports, first of all you will need to enable access logs for your load balancer. Details on how to enable these are present on the following link:

http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/enable-access-logs.html

Create AWS Access Key

To create an access key for your AWS account :

  • Use your AWS account email address and password to sign in to the AWS Management Console.
  • In the upper-right corner of the console, click the arrow next to the account name or number and then click Security Credentials.
  • On the AWS Security Credentials page, expand the Access Keys (Access Key ID and Secret Access Key) section.
  • Click Create New Access Key. ** Note: you can have a maximum of two access keys (active or inactive) at a time.
  • Click Download Key File to save the access key ID and secret key to a .csv file on your computer.
  • Attach a security policy to the new access key that grants permissions for the appropriate S3 bucket that contains AWS logs.

Get Trello Credentials

To get Api key follow the below steps:

To get a write access token:

To get a list id:

  • Open your trello board.
  • append ".json" to the url and press enter.
  • You will get all details of that board in a json format.
  • Search for "lists" in the json. In this lists array you will get the details of your lists (like id, name etc).

Configure Script

The script configuration is simple. Just setup the AWS and Trello credentials in the script.

Usage

Once the script is configured it should be run via cron every hour. To execute errorlog.php every 1 hour use the following command:

  • crontab -e 00 * * * * /path/to/php /path/to/RJSErrorLog.php

Credits

Initial script contributors at RJS, Kolkata:

  • R.Chaudhury [Development]
  • T.Chatterjee [Development]
  • R.Agarwalla [Concept & Flow]

About

Create a Trello workflow using your Amazon Web Services (AWS) Elastic Load Balancer (ELB) Logs. You may modify this to process standard Apache Logs as well.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages