petezybrick/awscwxls

AWS Mumbai Region not working

Opened this issue · 4 comments

This is not recognizing aws mumbai and other regions. But US region working fine. Please fix the issue.

Hi , have you find solution how it will work in other regions. Please help. Thanks.

You have to mention your own parameters like below in properties file

Profile section name from the .aws/credentials file

Optional - if not specified, the default credentials are assumed

credentialsProfileName = default

Region

Optional - if not specified, us-east-1 is assumed

credentialsRegion = us-east-1 //mention if you have other region

Start and end date/time.

Required

Note that the timezone used is based on the default timezone on the system where this utility is executed.

startTime = 2015-01-03 00:00:00
endTime = 2015-01-03 23:59:00

Target path/name of the output spreadsheet. This prefix name will have "_yyyymmdd_hhmmss.xlsx" appended

xlsPathNamePrefix = /home/pete.zybrick/temp/first

Extraction Sets: values required to extract a given set of CloudWatch data

Each name in the set has a sequential number attached

Each set will create a single sheet in the output XLS, with the sheet name being "namespace-n", i.e. AWS-EC2-0, AWS-ELB-1, etc.

Namespace, Dimension, Metric and Statistic values are in the CloudWatch Developers Guide

http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.html

Names/Values:

namespace.n = Valid Namespace, i.e. AWS/EC2

periodMinutes.n = Number of minutes in measurement period, i.e. 60 will return hourly values

dimensionName.n = Valid Dimension for the specified Namespace, i.e. InstanceId for AWS/EC2

dimensionValues.n = Blank-delimited list of values based on the DimensionName, i.e. if

dimensionName.n=InstanceId, then dimensionValues.n=i-a1a1a1a1 i-b2b2b2b2 etc.

metricStatisticNames.n = Blank delimited list of Metric|Statistic names. Each Metric|Statistic name

consists of a Metric valid for the Namespace and DimensionName (i.e CPUUtilization

is valid for AWS/EC2 and InstanceId)

Notes

1. The same namespace can be used multiple times with different Dimensions. For example, to get metrics/statistics

for a ELB based on the dimensions LoadBalancerName and AvailabilityZone:

namespace.0 = AWS/ELB

periodMinutes.0 = 15

dimensionName.0 = LoadBalancerName

dimensionValues.0 = GoCollette

metricStatisticNames.0 = HealthyHostCount|Average UnHealthyHostCount|Average

namespace.1 = AWS/ELB

periodMinutes.1 = 15

dimensionName.1 = AvailabilityZone

dimensionValues.1 = us-west-2a us-west-2b

metricStatisticNames.1 = HealthyHostCount|Average UnHealthyHostCount|Average

then go to the folder then type runcwxls sample.properties(if your file name is sample.properties).

It will extract the metrics and save the file in excel format in the path that you had mentioned.

The problem is related to the outdated aws java SDK, it does not include all regions. I got the tool working by updating to

com.amazonaws
aws-java-sdk
1.11.490