fluent-plugin-cloudwatch 1.2.14 → 1.2.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45d8c2420320473c4dfaebb1034d97ab165b1b4d
4
- data.tar.gz: f4169b49d842cb281e55e853d1079be73b147f35
3
+ metadata.gz: 9d3adafa0bd5e4b4d0b9293883ea4fb366b58aba
4
+ data.tar.gz: f22c8670fc9f3e444c1637518ddfc70056956dab
5
5
  SHA512:
6
- metadata.gz: 8fdb5b88eccb856a694ffa9f410cc5069c396ef80d1a7126c49e7acf9bc04da1a709ee24b5c47203dc4062ce46f87e80e2d0ed3bd61780d40de192bf68e516af
7
- data.tar.gz: 8bfc84fb6ac5cb787c7ffaf99ccad5b247cf1ed83c0621ba15265e2f6cede3ed38d43609ec50ed2a491f49b6d5dd91e35ad591a80e809db48297b0334f85761d
6
+ metadata.gz: 4d35af6e89189ef74e7fbe72b997ddbc93c54dc881498693813f6dbb72c53304418f6ab3cf5cf0645c39073315b9d0f197e3b1862adf1c058874e09902ed6a92
7
+ data.tar.gz: 110297ebd921c428da1b06cc1144e34a6cafa5b846afdaf618345bf3c4451b229d2f374248c33345eb2bb83c847b6ac7a970e05202e1eef7e47923a7ea879430
@@ -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.14"
7
+ gem.version = "1.2.15"
8
8
  gem.authors = ["Yusuke Nomura", "kenjiskywalker", "FUJIWARA Shunichiro"]
9
9
  gem.email = ["yunomu@gmail.com", "git@kenjiskywalker.org", "fujiwara.shunichiro@gmail.com"]
10
10
  gem.description = %q{Input plugin for AWS CloudWatch.}
@@ -49,7 +49,7 @@ class Fluent::CloudwatchInput < Fluent::Input
49
49
  :value => values.next,
50
50
  })
51
51
  end
52
- else
52
+ elsif @dimensions_name || @dimensions_value
53
53
  @dimensions.push({
54
54
  :name => @dimensions_name,
55
55
  :value => @dimensions_value,
@@ -116,4 +116,30 @@ class CloudwatchInputTest < Test::Unit::TestCase
116
116
  assert_equal true, d.instance.delayed_start
117
117
  end
118
118
 
119
+ ### for CloudWatchLogsMetricFilters
120
+ CONFIG_CWLOG_MF = %[
121
+ tag cloudwatch
122
+ aws_key_id test_key_id
123
+ aws_sec_key test_sec_key
124
+ cw_endpoint test_cloud_watch_endpoint
125
+ namespace LogMetrics
126
+ metric_name LogAccessCount,LogErrorCount
127
+ ]
128
+
129
+ def create_driver_cwlog_mf(conf = CONFIG_CWLOG_MF)
130
+ Fluent::Test::InputTestDriver.new(Fluent::CloudwatchInput).configure(conf)
131
+ end
132
+
133
+ def test_configure_cwlog_mf
134
+ d = create_driver_cwlog_mf
135
+ assert_equal 'cloudwatch', d.instance.tag
136
+ assert_equal 'test_key_id', d.instance.aws_key_id
137
+ assert_equal 'test_sec_key', d.instance.aws_sec_key
138
+ assert_equal 'test_cloud_watch_endpoint', d.instance.cw_endpoint
139
+ assert_equal 'LogMetrics', d.instance.namespace
140
+ assert_equal 'LogAccessCount,LogErrorCount', d.instance.metric_name
141
+ assert_nil d.instance.dimensions_name
142
+ assert_nil d.instance.dimensions_value
143
+ assert_equal [], d.instance.dimensions
144
+ end
119
145
  end
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.14
4
+ version: 1.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke Nomura
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-04-13 00:00:00.000000000 Z
13
+ date: 2016-04-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fluentd