fluent-plugin-cloudwatch 1.2.13 → 1.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/fluent-plugin-cloudwatch.gemspec +1 -1
- data/lib/fluent/plugin/in_cloudwatch.rb +5 -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: 45d8c2420320473c4dfaebb1034d97ab165b1b4d
|
4
|
+
data.tar.gz: f4169b49d842cb281e55e853d1079be73b147f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fdb5b88eccb856a694ffa9f410cc5069c396ef80d1a7126c49e7acf9bc04da1a709ee24b5c47203dc4062ce46f87e80e2d0ed3bd61780d40de192bf68e516af
|
7
|
+
data.tar.gz: 8bfc84fb6ac5cb787c7ffaf99ccad5b247cf1ed83c0621ba15265e2f6cede3ed38d43609ec50ed2a491f49b6d5dd91e35ad591a80e809db48297b0334f85761d
|
data/README.md
CHANGED
@@ -30,6 +30,7 @@ Get metrics from cloudwatch to fluentd.
|
|
30
30
|
period [period] (default: 300)
|
31
31
|
interval [interval] (default: 300)
|
32
32
|
delayed_start [bool] (default: false)
|
33
|
+
emit_zero [bool] (default: false)
|
33
34
|
</source>
|
34
35
|
```
|
35
36
|
|
@@ -234,6 +235,10 @@ But the latest metric is insufficient for `statistics Sum`.
|
|
234
235
|
|
235
236
|
If `offset` is specified, fluent-plugin-cloudwatch gets metrics between `offset` sec ago and older.
|
236
237
|
|
238
|
+
## config: emit_zero
|
239
|
+
|
240
|
+
If `emit_zero` is true and cloudwatch datapoint is empty, fluent-plugin-cloudwatch emits 0 instead of warn log "datapoint is empty".
|
241
|
+
|
237
242
|
## Contributing
|
238
243
|
|
239
244
|
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.14"
|
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.}
|
@@ -27,6 +27,7 @@ class Fluent::CloudwatchInput < Fluent::Input
|
|
27
27
|
config_param :read_timeout, :integer, :default => 30
|
28
28
|
config_param :delayed_start, :bool, :default => false
|
29
29
|
config_param :offset, :integer, :default => 0
|
30
|
+
config_param :emit_zero, :bool, :default => false
|
30
31
|
|
31
32
|
attr_accessor :dimensions
|
32
33
|
|
@@ -143,13 +144,15 @@ class Fluent::CloudwatchInput < Fluent::Input
|
|
143
144
|
:end_time => now.iso8601,
|
144
145
|
:period => @period,
|
145
146
|
})
|
146
|
-
|
147
|
-
datapoint = statistics[:datapoints].sort_by{|h| h[:timestamp]}.
|
147
|
+
if not statistics[:datapoints].empty?
|
148
|
+
datapoint = statistics[:datapoints].sort_by{|h| h[:timestamp]}.last
|
148
149
|
data = datapoint[s.downcase.to_sym]
|
149
150
|
|
150
151
|
# unix time
|
151
152
|
catch_time = datapoint[:timestamp].to_i
|
152
153
|
router.emit(tag, catch_time, { name => data })
|
154
|
+
elsif @emit_zero
|
155
|
+
router.emit(tag, now.to_i, { name => 0 })
|
153
156
|
else
|
154
157
|
log.warn "cloudwatch: #{@namespace} #{@dimensions_name} #{@dimensions_value} #{name} #{s} datapoints is empty"
|
155
158
|
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.
|
4
|
+
version: 1.2.14
|
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-
|
13
|
+
date: 2016-04-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|