Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
fab0d65
First release of extension!
Apr 12, 2013
f7b9654
Reverting files accidentally posted to example repo
Apr 13, 2013
554984b
Reverting files accidentally posted to example repo
Apr 13, 2013
6cb4118
[cloudwatch] scaffolding
portertech Apr 23, 2013
bcd9d4c
[cloudwatch] cloudwatch isolates regions, region config option
portertech Apr 23, 2013
2baaf90
[cloudwatch] do not track config changes while testing (early)
portertech Apr 23, 2013
4d7b99a
[cloudwatch] support multiple agents, aws config, prepare for collectors
portertech Apr 23, 2013
cca0a9d
[cloudwatch] quick'n dirty readme edits
portertech Apr 23, 2013
71a9ecf
[cloudwatch] use the aws sdk
portertech Apr 23, 2013
774415b
[cloudwatch] base collector sets up cloudwatch
portertech Apr 23, 2013
eb5ba6f
Merge branch 'cloudwatch'
portertech Apr 23, 2013
9a1a0af
working ec2 data point collection
portertech Apr 24, 2013
0c4ec09
use the cloudwatch dimension as the new relic category (eg. i-424242)
portertech Apr 24, 2013
1064f1d
handle nil/empty data points (fresh instances)
portertech Apr 24, 2013
dee051f
example plugin config file
portertech Apr 25, 2013
667313f
improved the readme
portertech Apr 25, 2013
2b09100
[components] custom component collection, for each cloudwatch dimensi…
portertech Apr 25, 2013
2cd6c22
[components] split collectors up
portertech Apr 25, 2013
a80f420
Merge branch 'components'
portertech Apr 25, 2013
89b8a43
multi-region support
portertech Apr 29, 2013
9799d75
RDS metric collection support
portertech Apr 29, 2013
4ea81a3
updated example config
portertech Apr 29, 2013
ad3b112
experimenting w/ some nasty metaprogramming
portertech Apr 29, 2013
a57e4f0
working overview toggle
portertech Apr 29, 2013
e038954
Merge branch 'meta'
portertech Apr 29, 2013
6b45354
updated config example to include overview
portertech Apr 29, 2013
a0f81a2
collecting sqs metrics (no detailed monitoring)
portertech Apr 30, 2013
83fa77b
sqs limited to 5 minute intervals, no detailed monitoring
portertech Apr 30, 2013
6620fd6
discover detailed monitoring for ec2 instances
portertech Apr 30, 2013
a5509a7
collecting ebs volume metrics
portertech Apr 30, 2013
f699372
collect basic elasticache metrics
portertech May 1, 2013
3c447cb
complete metric list for elasticache
portertech May 2, 2013
7b61eff
updated example config for additional agents
portertech May 2, 2013
409e768
collect sns metrics
portertech May 2, 2013
99b1e4c
grab the data point timestamp, prep'n for backfill/end_time support
portertech May 3, 2013
d81ba03
collect DynamoDB metrics
portertech May 3, 2013
63dea9f
collect elb metrics
portertech May 3, 2013
cf74a64
updated example plugin config
portertech May 6, 2013
af445a1
readme edit, bundle exec
portertech May 6, 2013
7199864
grab a 10 min window for lower resolution metrics, repeat last to fill.
portertech May 7, 2013
4b7ce0d
drop "overview" from human labels, no overview dashboard for elasticache
portertech May 8, 2013
abc3c8b
disable the dynamodb agent for now
portertech May 8, 2013
8bbe141
readme edits, a few notes
portertech May 9, 2013
06f9144
strip example config, only show the ec2 agent
portertech May 9, 2013
4b3a926
readme edit, mention t1.micro
portertech May 9, 2013
0d541a8
all agents/plugins are available, just not published.
portertech May 9, 2013
2c1b62b
collect metrics for all aws regions
portertech May 9, 2013
c38feea
updated readme, t1.micro dep, no need to provide specific regions
portertech May 10, 2013
1034131
updated the example config file, to reflect the recent changes
portertech May 12, 2013
99bc980
flush stdout immediately, for logging
portertech May 13, 2013
25908b0
readme, add AMI details, just a start
portertech May 13, 2013
fff27ad
Updating AMI beta testing procedure
May 13, 2013
4785e88
Fixing typo in email address
May 13, 2013
3459990
Merge pull request #1 from newrelic-platform/cooper
portertech May 14, 2013
0121023
Fixing markdown issues and typos in README
May 15, 2013
d62a331
One more time with the markdown foo
May 15, 2013
e265a46
Linking to AWS docs on enabling detailed CloudWatch monitoring
May 15, 2013
e3aec50
updated readme w/ new ami id
portertech May 22, 2013
c11d57f
updated readme, new us-east-1 AMI (for market)
portertech May 28, 2013
e9ce0f1
update gemfile
Jun 7, 2013
ae73642
updated syntax
Jun 7, 2013
d391d14
[#51604085] config file rename and gitignore file change
Jun 13, 2013
6cdf52e
modified gitignore
Jun 13, 2013
7737ded
Merge pull request #3 from newrelic-platform/serened/config_file_cleanup
portertech Jun 13, 2013
9238469
only ec2 and ebs have overview, updated plugin config template
portertech Jun 14, 2013
a4264d1
update README with correct file name and added license key instructions
Jun 14, 2013
5925bfc
Merge pull request #4 from newrelic-platform/README_update
portertech Jun 14, 2013
2b9f625
data points component override, use instance name tag when available
portertech Jun 14, 2013
7ab4ea4
use ebs name tag for the component name, when available
portertech Jun 17, 2013
1f77997
agent version 1.0.0
portertech Jun 17, 2013
28eb497
Removing AMI instructions from beta
Jun 18, 2013
03b127f
added "keep this process running" and "for support" sections
Jun 18, 2013
bc405ce
Allow public install
khobbits Jun 19, 2013
8337461
added link for https://github.com/newrelic-platform/newrelic_aws_clou…
Jun 19, 2013
5c68786
Update README.md
Jun 19, 2013
f759a9f
Update README.md
Jun 19, 2013
2f4e01f
updated Ruby requirement
Jun 19, 2013
3b02152
Merge pull request #6 from khobbits/master
leeatchison Jun 19, 2013
710da06
Merge pull request #8 from softwaregravy/patch-1
leeatchison Jun 19, 2013
7eddde0
update gemfile and version
Jun 19, 2013
35298e9
Merge pull request #11 from newrelic-platform/serened/gemfile_update
Jun 19, 2013
714e970
update lag description
Jun 20, 2013
5e6b3d2
lock the newrelic_plugin gem down to the bugfix level due to upcoming…
nathanhumbert Jun 26, 2013
da07652
Merge pull request #12 from newrelic-platform/nathan/prep_for_newreli…
portertech Jun 26, 2013
0cef0fe
[statistic] support grabbing the correct statistic
portertech Jun 26, 2013
564feb5
[statistic] fixed statistics for elb
portertech Jun 26, 2013
e837c4c
[statistic] fixed statistics for ec2
portertech Jun 26, 2013
f011a73
[statistic] fixed statistics for ebs
portertech Jun 27, 2013
75f3e30
[statistic] fixed statistics for rds
portertech Jun 27, 2013
0baa99b
[statistic] fixed statistics for sns
portertech Jun 27, 2013
4e8908d
[statistic] fixed statistics for sqs
portertech Jun 27, 2013
ea17165
[statistic] fixed statistics for ec
portertech Jun 27, 2013
7918fce
[statistic] fixed statistics for ddb (WIP)
portertech Jun 27, 2013
4ec7008
Merge pull request #13 from newrelic-platform/statistic
portertech Jun 27, 2013
57859cc
agent version bumps, 2.0.0
portertech Jun 27, 2013
6980ecf
[#52567061] Update README with AMI information
Jul 1, 2013
32ec290
Merge pull request #14 from newrelic-platform/serened/readme_update
Jul 3, 2013
f86f878
added collector verbose logging, verbose > 1
portertech Jul 9, 2013
af6d294
Merge branch 'logging'
portertech Jul 9, 2013
8cf8f6e
allow users to specify certain regions, improved performance
portertech Jul 9, 2013
599bc6a
updated plugin config file template, regions:
portertech Jul 9, 2013
30e1738
Merge branch 'regions'
portertech Jul 9, 2013
7169f13
plugin (agents) version bump, 2.1.0
portertech Jul 9, 2013
387a7fc
include instance and volume ids in component when name tag is used
portertech Jul 9, 2013
13c9f0f
Merge branch 'beanstalk'
portertech Jul 11, 2013
d4001b6
capture and log cloudwatch query error backtraces when verbose >= 1
portertech Jul 11, 2013
47f5c4b
readme edits
portertech Jul 11, 2013
98b3da3
Merge branch 'logging'
portertech Jul 11, 2013
3cdf7b8
version bump, 3.0.0
portertech Jul 11, 2013
b0620bf
deprecating overview plugins
nathanhumbert Jul 19, 2013
bcc41ce
Merge pull request #16 from newrelic-platform/nathan/deprecate_overviews
nathanhumbert Jul 19, 2013
bf0b155
Link to Support, don't just refer to support
Aug 10, 2013
c609e45
Link to review page
Aug 10, 2013
efaf4d0
Grammar is sexy
Aug 10, 2013
7ceebe5
Credit to original plugin author - promised long ago
Aug 10, 2013
3bd7238
Redundant
Aug 10, 2013
50a484f
Overview plugins are going away, so no need to keep advertising them
Aug 10, 2013
38b2a7c
Merge pull request #17 from newrelic-platform/cooper/README-update
Aug 13, 2013
08bd5b3
Added some IAM documentation to the README
portertech Aug 14, 2013
11d6255
Removing Gemfile.lock, added it to git ignore
nathanhumbert Oct 3, 2013
2fa1888
Update README.md to include Windows exec hint
winzig Oct 8, 2013
85e387a
Updating dependencies
nathanhumbert Oct 10, 2013
f3b5c17
Refactored to work on newrelic_plugin 1.3.x
nathanhumbert Oct 14, 2013
7103242
Addressing minor issues raised during review
nathanhumbert Oct 14, 2013
d9da723
prepend missing Component/ to metric names
nathanhumbert Oct 15, 2013
a060391
Merge pull request #19 from newrelic-platform/nathan/sdk_upgrade
nathanhumbert Oct 15, 2013
b7fbcc5
Upgrading AWS SDK to version 1.24.0
Nov 6, 2013
5a2883f
Merge pull request #21 from newrelic-platform/jstenhouse/upgrading_aw…
Nov 6, 2013
7f6c577
adding aws sdk logging
Dec 11, 2013
6fea50a
Merge pull request #23 from newrelic-platform/jstenhouse/adding_aws_s…
Dec 11, 2013
05d3341
improved debug messages
Dec 16, 2013
9ee5c93
adding cloudwatch_delay for adjusting metric time window
Dec 16, 2013
8126c90
Merge pull request #24 from newrelic-platform/jstenhouse/adding_cloud…
Dec 16, 2013
98f4f41
adding tag filtering for ec2 and ebs agents
Jan 10, 2014
884183e
Merge pull request #25 from newrelic-platform/jstenhouse/adding_tag_f…
Jan 10, 2014
03c758f
fixing ec2 detailed monitoring
Jan 13, 2014
c9ebccd
updating changelog
Jan 13, 2014
9eb1f94
Merge pull request #26 from newrelic-platform/jstenhouse/fixing_detai…
Jan 13, 2014
60abfed
adding new metrics to elb
Jan 13, 2014
14423e0
Merge pull request #27 from newrelic-platform/jstenhouse/adding_elb_m…
Jan 14, 2014
27dfcbd
removing reference to overview dashboards
Jan 14, 2014
fac5274
adding enabled flag to agent configuration
Jan 20, 2014
531adf3
Merge pull request #28 from newrelic-platform/jstenhouse/removing_ove…
Jan 20, 2014
44655ae
updated amazon word usage
Jan 20, 2014
9bcb5b8
Merge pull request #29 from newrelic-platform/jstenhouse/improving_docs
Jan 20, 2014
1d95ae7
adding elasticache redis support
Jan 21, 2014
585ca3a
Merge pull request #30 from newrelic-platform/jstenhouse/adding_ec_redis
Jan 22, 2014
24d91f3
updating release date in changelog
Jan 22, 2014
a99ea2d
Merge pull request #31 from newrelic-platform/jstenhouse/updating_cha…
Jan 22, 2014
bffe802
adding chef/puppet instructions to readme
Jan 30, 2014
89bb341
Merge pull request #32 from newrelic-platform/jstenhouse/adding_chef_…
Jan 30, 2014
e4ba3bd
Ability to run newrelic_aws as a daemon.
Mar 5, 2014
f484984
Readme updated to show how to use the daemon script
Mar 5, 2014
f38040d
Tweak for daemons; needs proper working directory
Mar 5, 2014
0df5619
Merge pull request #34 from jamsi/master
Apr 22, 2014
512a56f
fixing whitespace and removing uneeded require statement
Apr 22, 2014
1a4d2a7
Merge pull request #37 from newrelic-platform/jstenhouse/whitespace_c…
Apr 22, 2014
c66e2b5
Merge pull request #18 from winzig/master
Apr 28, 2014
ecf077d
removing incorrect overview examples
May 7, 2014
f2bd0ff
Merge pull request #38 from newrelic-platform/jstenhouse/updating_readme
May 7, 2014
b188dbd
fixing cloudwatch delay for ec2
May 7, 2014
b8a1713
fixing cloudwatch_delay for ebs sns and sqs
May 8, 2014
1fc18d3
Merge pull request #39 from newrelic-platform/jstenhouse/fixing_cloud…
May 13, 2014
98502ee
Allow limiting of RDS instances by specifying instance_identifiers in…
bahayman Feb 27, 2014
2b44c93
remove check for valid AWS credentials
rjocoleman Mar 15, 2014
4ee3f85
Allow AWS authentication settings to be set via IAM Roles and Instanc…
nr-nathanhumbert Sep 23, 2014
a9a3cfd
Merge pull request #40 from newrelic-platform/nathan/iam_roles
nathanhumbert Sep 23, 2014
6049b52
Ruby 1.8.7 bugfix
nr-nathanhumbert Sep 25, 2014
331ab88
Merge pull request #41 from newrelic-platform/nathan/bugfix
nathanhumbert Sep 25, 2014
1c97567
documented region config
thande Oct 13, 2014
b2b8829
Merge pull request #42 from thande/DocumentRegionConfig
nathanhumbert Oct 13, 2014
34811fd
Remove inaccurate link about AWS IAM
jalessio Jun 12, 2015
781cd57
Merge pull request #48 from jalessio/patch-1
nathanhumbert Oct 30, 2015
92155bb
Update AWS SDK to current version 1.66.0 to support region eu-central…
Feb 21, 2016
e6eaecc
Merge pull request #55 from doodoori2/master
rengawm Mar 3, 2016
17bf72a
Bump version number up to 3.3.3
rengawm Mar 3, 2016
270ed4a
Bump to 3.3.4, support ap-south-1
chaupt Jul 21, 2016
3d88d94
Merge pull request #59 from newrelic-platform/201607_region_refresh
chaupt Sep 2, 2016
370f79c
Update the AMI link to current version
chaupt Sep 2, 2016
5992c72
Merge pull request #61 from newrelic-platform/readme-update-20160902
chaupt Sep 2, 2016
e9be110
Modify regions config key to use proper YAML syntax in all places
nrrdulan Sep 15, 2016
baa358f
Merge pull request #63 from dwsarber/master
chaupt Sep 16, 2016
bcdad39
Add Application Load Balancer collector
msummers-nr Oct 18, 2016
0619990
Pull request changes
msummers-nr Oct 19, 2016
eff4331
Merge pull request #67 from msummers-nr/master
chaupt Oct 19, 2016
14e4e5a
Updated README to include Contributing paragraph
Oct 20, 2016
9758ccf
Merge pull request #68 from paigebernier/patch-1
nathanhumbert Oct 21, 2016
fb73f43
Don't blow away configured regions when using AWS metadata for IAM ba…
jlrgraham23 Aug 19, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config/newrelic_plugin.yml
.bundle
vendor/
Gemfile.lock
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## New Relic Amazon CloudWatch Plugin ##

### v3.3.5 - October 19, 2016 ###

**Changes**

* Support new namespace: AWS/ApplicationELB

### v3.3.4 - July 21, 2016 ###

**Changes**

* Support new region: ap-south-1

### v3.3.3 - February 21, 2016 ###

**Changes**

* Update AWS SDK and support new regions: ap-northeast-2, eu-central-1

### v3.3.2 - September 25, 2014 ###

**Bug Fixes**

* Fixed a Ruby 1.8.7 bug that was introduced in v3.3.1

### v3.3.1 - September 23, 2014 ###

**Features**

* Added support for pulling AWS credentials from IAM Roles and Instance Profiles
* Added support for filtering RDS instances by instance identifiers

**Bug Fixes**

* Fixed cloudwatch_delay bug for EC2, EBS, SNS, and SQS where end_time was being set incorrectly

### v3.3.0 - January 22, 2014 ###

**Features**

* Added AWS tag filtering for EC2 and EBS instances
* Added new metrics to ELB: `BackendConnectionErrors`, `SurgeQueueLength`, and `SpilloverCount`
* Added new `ECR` plugin support for ElastiCache Redis

**Bug Fixes**

* Fixed detailed one minute monitoring for EC2 instances

**Changes**

* Overview dashboards have been deprecated

### v3.2.1 - December 16, 2013 ###

**Features**

* Added `cloudwatch_delay` attribute to configure each service. See README for details
* Added AWS SDK debug logging at verbose log level 2 or higher

### v3.2.0 - November 6, 2013 ###

**Features**

* Upgraded AWS SDK to 1.24.0 for general improvements
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source "http://rubygems.org"
gem "newrelic_plugin", :git => "[email protected]:newrelic-platform/newrelic_plugin.git"

source "https://rubygems.org"
gem 'newrelic_plugin', '~> 1.3.0'
gem 'nokogiri', '<= 1.5.9'
gem 'aws-sdk', '~> 1.66.0'
gem 'daemons'
19 changes: 0 additions & 19 deletions Gemfile.lock

This file was deleted.

204 changes: 195 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,195 @@
## Example Agent Install

1. Download the latest tagged version from `https://github.com/newrelic-platform/newrelic_example_plugin/tags`
2. Extract to the location you want to run the example agent from
3. Copy `config/template_newrelic_plugin.yml` to `config/newrelic_plugin.yml`
4. Edit `config/newrelic_plugin.yml` and replace "YOUR_LICENSE_KEY_HERE" with your New Relic license key
5. Create a plugin in New Relic
6. Edit `newrelic_example_agent` and replace "PUT YOUR GUID HERE" with the GUID that was generated when you created the plugin
7. run `./newrelic_example_agent`
# New Relic Amazon CloudWatch Plugin

This tool provides the metric collection agents for the following New Relic plugins:

- EC2
- EBS
- ELB
- RDS
- SQS
- SNS
- ElastiCache
- Memcached
- Redis

## Dependencies
- A single t1.micro EC2 instance (in any region)
- Ruby (>= 1.9.2)
- Rubygems (>= 1.3.7)
- Bundler `gem install bundler`
- Git

## Install

### Manual Installation
1. Download the latest tagged version from [https://github.com/newrelic-platform/newrelic_aws_cloudwatch_extension/tags](https://github.com/newrelic-platform/newrelic_aws_cloudwatch_extension/tags)
2. Extract to the location you want to run the plugin from
3. Rename `config/template_newrelic_plugin.yml` to `config/newrelic_plugin.yml`
4. Edit `config/newrelic_plugin.yml`
5. Run `bundle install`
6. Run `bundle exec ./bin/newrelic_aws` (or on Windows `bundle exec ruby bin\newrelic_aws`)

### Installation with Chef/Puppet

[Chef](http://www.getchef.com) and [Puppet](http://puppetlabs.com) are tools that automate software installation. The Amazon CloudWatch plugin has installation support for both:

- [Chef Cookbook](http://community.opscode.com/cookbooks/newrelic_plugins)
- [Puppet Module](https://forge.puppetlabs.com/newrelic/newrelic_plugins)

**Note:** For more information on using Chef and Puppet with New Relic, see the New Relic [docs](https://docs.newrelic.com/docs/plugins/plugin-installation-with-chef-and-puppet).

## Configuration

This plugin is configured through the `config/newrelic_plugin.yml` file. It requires:

- a New Relic license key that can be found at https://rpm.newrelic.com/extensions/com.newrelic.aws.ec2
- an AWS Access Key
- an AWS Secret Key

### Regions
The plugin can also be configured to query specific CloudWatch regions, e.g. `us-east-1` or `us-west-1`. By default the plugin will query all available regions.

```
regions:
- us-east-1
- us-east-2
- us-west-1
```

### Amazon ElastiCache

Amazon ElastiCache supports both Memcached and Redis caching technologies. The Memcached agent is configured under the `ec` section, while the Redis agent is configured under the `ecr` section.

### Tag Filtering

Filtering instances by tags is supported for both `EC2` and `EBS`. Details on adding tags to instances is available in the [AWS documentation](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).

A list of case-sensitive tags can be added to the yml configuration for `EC2` and `EBS` and only instances containing one or more of those tags will be monitored. This can reduce CloudWatch requests and costs.

Tagged instances will be monitored if they:

- have a tag with a matching key in the tag list (e.g. tagged with key `newrelic_monitored` and any value: `true`, `yes`, etc.)
- have a `Name` or `name` tag with a matching value in the tag list (e.g. tagged with key `Name` and value `prod_1_db`)

If there are no configured tags, all available instances will be monitored. This is the default behavior.

```
...
agents:
ec2:
enabled: true
tags:
- newrelic_monitored
- prod_1_db
ebs:
enabled: true
tags:
- newrelic_monitored
```

### RDS Instance Filtering
When an IAM policy for rds:DescribeDBInstances has Resource restrictions, the rds-describe-db-instances call will fail when an allowed DBInstanceIdentifier is not specified.

If there are no configured instance_identifiers, all available instances will be monitored. This is the default behavior.

```
...
agents:
rds:
enabled: true
instance_identifiers:
- db1
- db2
```

### CloudWatch Delay
As noted below, there is a default 60 second delay in reporting metrics from CloudWatch which adjusts the time window for queried data. This is due to CloudWatch metrics not being immediately available for querying as they may take some time to process. Unfortunately there is little that can be done from the plugin to address this, besides adjusting the time window for metric querying from CloudWatch. The configuration option `cloudwatch_delay` can be specified for each AWS agent to override the default 60 second delay.

```
...
agents:
ec2:
enabled: true
cloudwatch_delay: 120
ebs:
enabled: true
...
```

####Affected Metrics

- `RDS/CPU Utilization` - If you see 0% CPU utilization, try increasing the `cloudwatch_delay` option for the AWS RDS agent.

## AMI
This plugin is also available as an Amazon Machine Image (AMI) via the AWS Marketplace. Learn more, then quickly install and configure the AMI here: https://aws.amazon.com/marketplace/pp/B01KLLCQZE/

The AMI takes the contents of `config/newrelic_plugin.yml` as user-data, which is configured when creating the EC2 instance. Once the instance is running with valid user-data, no further action is required. To change the configuration, terminate the current instance and create another.

If you like the AMI, please [leave a 5-star review](https://aws.amazon.com/marketplace/review/product-reviews/ref=dtl_pop_customer_reviews?ie=UTF8&asin=B01KLLCQZE) in the AWS Marketplace.

If you don't like the AMI, New Relic would appreciate that you do not leave a bad review on the AWS Marketplace. Instead, open a ticket with [New Relic Support](https://support.newrelic.com) and let us know what we could do better. We take your feedback very seriously - and by opening a ticket, we can notify you when we've addressed your feedback.

## IAM (AWS API Credentials)

This plugin requires AWS API credentials, using IAM is highly recommended, giving it read-only access to select services.

You will need to create a new IAM group, `NewRelicCloudWatch`, where the permissions will be defined. You will want to use a custom policy for the group, `NewRelicCloudWatch`, using the following JSON for the policy document.

```
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"autoscaling:Describe*",
"cloudwatch:Describe*",
"cloudwatch:List*",
"cloudwatch:Get*",
"ec2:Describe*",
"ec2:Get*",
"ec2:ReportInstanceStatus",
"elasticache:DescribeCacheClusters",
"elasticloadbalancing:Describe*",
"sqs:GetQueueAttributes",
"sqs:ListQueues",
"rds:DescribeDBInstances",
"SNS:ListTopics"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
```

To get API credentials, a IAM user must be created, `NewRelicCloudWatch`. Be sure to save the user access key id and secret access key on creation. Add the user to the `NewRelicCloudWatch` IAM group. Use the IAM user API credentials in the plugin configuration file.

## Notes
- CloudWatch detailed monitoring is recommended, please enable it when available. (see *Using Amazon CloudWatch* section on http://aws.amazon.com/cloudwatch/)
- Chart x-axis (time) is off by 60 seconds, this is due to CloudWatch's lag in reporting metrics.
- Latest data point is used to fill gaps in low resolution metrics.

## Keep this process running
You can use services like these to manage this process.

- [Upstart](http://upstart.ubuntu.com/)
- [Systemd](http://www.freedesktop.org/wiki/Software/systemd/)
- [Runit](http://smarden.org/runit/)
- [Monit](http://mmonit.com/monit/)

## Or run it as a daemon
The provided daemon.rb file allows newrelic_aws to run as a daemon.

chmod +x bin/daemon
bundle exec bin/daemon start
bundle exec bin/daemon stop

## For support
Plugin support and troubleshooting assistance can be obtained by visiting [support.newrelic.com](https://support.newrelic.com)

## Contributing

You are welcome to send pull requests to us - however, by doing so you agree that you are granting New Relic a non-exclusive, non-revokable, no-cost license to use the code, algorithms, patents, and ideas in that code in our products if we so choose. You also agree the code is provided as-is and you provide no warranties as to its fitness or correctness for any purpose.

## Credits
The New Relic AWS plugin was originally authored by [Sean Porter](https://github.com/portertech) and the team at [Heavy Water Operations](http://hw-ops.com/). Subsequent updates and support are provided by [New Relic](http://newrelic.com/platform).
14 changes: 14 additions & 0 deletions bin/daemon
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env ruby

#
# Start
# - bundle exec bin/daemon start
#
# Stop
# - bundle exec bin/daemon stop
#

require 'daemons'

pwd = File.join(File.dirname(File.expand_path(__FILE__)), "../")
Daemons.run('bin/newrelic_aws', :dir_mode => :normal, :dir => pwd)
18 changes: 18 additions & 0 deletions bin/newrelic_aws
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /usr/bin/env ruby

#
# This plugin includes several AWS agents, each pulling data from CloudWatch.
#
# Sean Porter ([email protected])
# 2013-04-23
#

unless $:.include?(File.dirname(__FILE__) + '/../lib/')
$: << File.dirname(__FILE__) + '/../lib'
end

Dir.chdir(File.join(File.dirname(__FILE__), "../"))

STDOUT.sync = true

require 'newrelic_aws'
Loading