Git Product home page Git Product logo

awscwxls's Introduction

Generic AWS CloudWatch to Spreadsheet Exporter

CloudWatch doesn't provide an Export utility - this does. awscwxls creates spreadsheets based on generic sets of Namespace/Dimension/Metric/Statistic specifications. As long as AWS continues to follow the Namespace/Dimension/Metric/Statistic pattern, awscwxls should work for existing and future Namespaces (Services). Each set of specifications is stored in a properties file, so each properties file can be configured for a specific set of AWS Services and resources. Take a look at run/properties/template.properties for a complete example.

To run:

  • Prereqs
    • Java 1.7
    • AWS account, .aws/credentials file containing your keys
    • AWS account must have CloudWatch IAM permission
  • Copy the run/ directory to the local file system
  • Review properties/first.properties. This is a very simple properties file that will extract EC2 statistics for a single instance
  • Update properties/first.properties based on the TODO comments in the file
  • Run
    • Linux: ./runcwxls properties/first.properties
    • Windows: runcwxls properties/first.properties
  • Review the spreadsheet
  • Advanced
    • Review properties/template.properties. This is an example of collecting stats from multiple Namespace/Dimension/Metric/Statistic combinations

Java Project Overview

  • Maven project in Eclipse, but should easily port to other IDE's
  • Uses Apache POI to create the spreadsheets. Take a look at BaseXls.java, encapsulates most of the POI complexity, MetricSpreadsheet.java creates the xls.
  • Entry point: ExtractSpreadsheet.main()
  • ExtractMetrics.java does most of the heavy lifting - connecting to CW and getting the metrics/statistics

Thanks to Alois Reitbauer, the examples on his blog accelerated my understanding of the CW API.

awscwxls's People

Contributors

petezybrick avatar

Watchers

 avatar

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.