fluent-plugin-cloudwatch 1.2.11 → 1.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/fluent-plugin-cloudwatch.gemspec +1 -1
- data/lib/fluent/plugin/in_cloudwatch.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 623454cb13e5f86266ed713a9a3887d0b641a123
|
4
|
+
data.tar.gz: ba8b5303fdd6766782f9ab0714fe6fc7ef76d22f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dfef965c1ceab2f8cbe2ff2d9be4cc83b9a724d94115a4f65cb9428bf2ccfab7f09a4fb4a699fb112e9b3ebe24c86a60a9da38df9e7b25aef8a14b20d17f1ef
|
7
|
+
data.tar.gz: 1adefd4cdc57162c3a1f919cfaa88e83b568705792489a058aed0bda393572e8e62ee8f04645e011fa37e214851bf56d8892460d3cacc0b1ea7926d8f98aa078
|
data/README.md
CHANGED
@@ -212,6 +212,16 @@ Note: Billing requires the us-east-1 endpoint
|
|
212
212
|
|
213
213
|
When config `delayed_start` is set true, plugin startup will be delayed in random seconds(0 ~ interval).
|
214
214
|
|
215
|
+
## config: offset
|
216
|
+
|
217
|
+
unit: seconds.
|
218
|
+
|
219
|
+
flunet-plugin-cloudwatch gets metrics between now and `period` × 10 sec ago, and pick a latest value from that.
|
220
|
+
|
221
|
+
But the latest metric is insufficient for `statistics Sum`.
|
222
|
+
|
223
|
+
If `offset` is specified, fluent-plugin-cloudwatch gets metrics between `offset` sec ago and older.
|
224
|
+
|
215
225
|
## Contributing
|
216
226
|
|
217
227
|
1. Fork it
|
@@ -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.
|
7
|
+
gem.version = "1.2.12"
|
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.}
|
@@ -26,6 +26,7 @@ class Fluent::CloudwatchInput < Fluent::Input
|
|
26
26
|
config_param :open_timeout, :integer, :default => 10
|
27
27
|
config_param :read_timeout, :integer, :default => 30
|
28
28
|
config_param :delayed_start, :bool, :default => false
|
29
|
+
config_param :offset, :integer, :default => 0
|
29
30
|
|
30
31
|
attr_accessor :dimensions
|
31
32
|
|
@@ -130,13 +131,14 @@ class Fluent::CloudwatchInput < Fluent::Input
|
|
130
131
|
|
131
132
|
def output
|
132
133
|
@metric_name.split(",").each {|m|
|
134
|
+
now = Time.now - @offset
|
133
135
|
statistics = @cw.get_metric_statistics({
|
134
136
|
:namespace => @namespace,
|
135
137
|
:metric_name => m,
|
136
138
|
:statistics => [@statistics],
|
137
139
|
:dimensions => @dimensions,
|
138
|
-
:start_time => (
|
139
|
-
:end_time =>
|
140
|
+
:start_time => (now - @period*10).iso8601,
|
141
|
+
:end_time => now.iso8601,
|
140
142
|
:period => @period,
|
141
143
|
})
|
142
144
|
unless statistics[:datapoints].empty?
|
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.
|
4
|
+
version: 1.2.12
|
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: 2015-
|
13
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|