fluent-plugin-cloudwatch 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "fluent-plugin-cloudwatch"
7
- gem.version = "1.2.3"
7
+ gem.version = "1.2.4"
8
8
  gem.authors = ["Yusuke Nomura", "kenjiskywalker"]
9
9
  gem.email = ["yunomu@gmail.com", "git@kenjiskywalker.org"]
10
10
  gem.description = %q{Input plugin for AWS CloudWatch.}
@@ -13,6 +13,8 @@ class Fluent::CloudwatchInput < Fluent::Input
13
13
  config_param :dimensions_value, :string, :default => nil
14
14
  config_param :period, :integer, :default => 300
15
15
  config_param :interval, :integer, :default => 300
16
+ config_param :open_timeout, :integer, :default => 10
17
+ config_param :read_timeout, :integer, :default => 30
16
18
 
17
19
 
18
20
  def initialize
@@ -22,10 +24,16 @@ class Fluent::CloudwatchInput < Fluent::Input
22
24
 
23
25
  def configure(conf)
24
26
  super
27
+
28
+ AWS.config(
29
+ :http_open_timeout => @open_timeout,
30
+ :http_read_timeout => @read_timeout,
31
+ )
32
+
25
33
  @cw = AWS::CloudWatch.new(
26
34
  :access_key_id => @aws_key_id,
27
35
  :secret_access_key => @aws_sec_key,
28
- :cloud_watch_endpoint => @cw_endpoint
36
+ :cloud_watch_endpoint => @cw_endpoint,
29
37
  ).client
30
38
  end
31
39
 
@@ -56,11 +64,11 @@ class Fluent::CloudwatchInput < Fluent::Input
56
64
  :statistics => [@statistics],
57
65
  :dimensions => [{
58
66
  :name => @dimensions_name,
59
- :value => @dimensions_value
67
+ :value => @dimensions_value,
60
68
  }],
61
69
  :start_time => (Time.now - @period*2).iso8601,
62
70
  :end_time => Time.now.iso8601,
63
- :period => @period
71
+ :period => @period,
64
72
  })
65
73
  unless statistics[:datapoints].empty?
66
74
  stat = @statistics.downcase.to_sym
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-cloudwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-19 00:00:00.000000000 Z
13
+ date: 2013-09-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fluentd