Giter Site home page Giter Site logo

vigeek / aws-cloudtrail-to-logstash Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 5.0 361 KB

Consumes cloudtrail logs, outputs to a json for LogStash ingestion. Kibana dashboard included.

License: MIT License

Shell 100.00%
aws-cloudtrail cloudtrail-consumer logstash kibana elasticsearch

aws-cloudtrail-to-logstash's Introduction

aws-cloudtrail-to-logstash

Pulls down AWS cloudtrail logs from S3 and outputs to a json file to be ingested by LogStash. The json logs are preformatted and easily parsable by Logstash.

Requires

s3cmd -and- jq

Configuration

  1. Edit the script and update variable 'AWS_ACCOUNT_NUMBER' with your account number.
  2. Edit the script and update variable 'S3_BUCKET_NAME' with your buckets name.
  3. Ensure your AWS credentials are configured (e.g: ~/.aws/credentials)
  4. Execute the script (it will run in a constant loop)

Configuration extended.

Included is a traditional init script and monit config (optional), to use the init script...

  1. Ensure 'cloud-trail-consumer.sh' is located here: /opt/cloudtrail-consumer
  2. Alternatively, edit 'cloudtrail-consumer-init.sh' and change variable 'THE_PATH'
  3. Place the init script[cloudtrail-consumer-init.sh] in /etc/init.d
  4. Make init script executable: chmod ug+x cloudtrail-consumer-init.sh
  5. It can then be started as such: /etc/init.d/cloudtrail-consumer-init.sh start (or stop)
  6. The included monit script can be placed in your monits configuration directory and used to startup the cloudtrail consumer on start up.

Ingesting ELB logs

See here: https://github.com/vigeek/aws-elb-logs-to-logstash

Example dashboard (included)

To install, please view readme in kibana-dashboard directory alt tag

Some minor details from the dashboard image are obfuscated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.