Skip to content

Commit

Permalink
Merge pull request newrelic#26 from newrelic-platform/jstenhouse/fixi…
Browse files Browse the repository at this point in the history
…ng_detailed_ec2

fixing ec2 detailed monitoring
  • Loading branch information
Jason Stenhouse committed Jan 13, 2014
2 parents 884183e + c9ebccd commit 9eb1f94
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## New Relic AWS CloudWatch Plugin ##

### v3.3.0 - Unreleased ###

**Features**

* Added AWS tag filtering for EC2 and EBS instances

**Bug Fixes**

* Fixed detailed one minute monitoring for EC2 instances

### 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
2 changes: 1 addition & 1 deletion lib/newrelic_aws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def poll_cycle
NewRelic::PlatformLogger.debug("############## start poll_cycle ############")
metric_count = 0
@collectors.each do |collector|
collector.collect.each do |component_name, metric_name, unit, value, timestamp|
collector.collect.each do |component_name, metric_name, unit, value|
component = @context.get_component(component_name, @components_collection.guid)
@components_collection.report_metric(request, component, metric_name, unit, value) unless component.nil?
metric_count += 1
Expand Down
2 changes: 1 addition & 1 deletion lib/newrelic_aws/collectors/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_data_point(options)
component = options[:component]
component ||= options[:dimensions].map { |dimension| dimension[:value] }.join("/")
statistic = options[:statistic].downcase.to_sym
[component, options[:metric_name], point[:unit].downcase, point[statistic], point[:timestamp].to_i]
[component, options[:metric_name], point[:unit].downcase, point[statistic]]
end

def collect
Expand Down
2 changes: 1 addition & 1 deletion lib/newrelic_aws/collectors/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def metric_list
def collect
data_points = []
instances.each do |instance|
detailed = instance.monitoring == :enable
detailed = instance.monitoring == :enabled
name_tag = instance.tags.detect { |tag| tag.first =~ /^name$/i }
metric_list.each do |(metric_name, statistic, unit)|
data_point = get_data_point(
Expand Down

0 comments on commit 9eb1f94

Please sign in to comment.