logstash-output-cloudwatch 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/logstash/outputs/cloudwatch.rb +15 -16
- data/logstash-output-cloudwatch.gemspec +2 -2
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7873397a2d5b2b20af9ddc3883f5269cc9de9ad
|
4
|
+
data.tar.gz: 3a90d28b1d520e019431543297ae6e9e6e803296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f3dcb9b4bb563e8d7b4c4b6859527fdf8163e8f33f047b7f5333f1621b10fcd2cf2c4beadca4c176783f7ef881a7254f3f7e964fa5b61105cefa5ca0f3bd21f
|
7
|
+
data.tar.gz: 3aaa9e1431f5b86628d3cac53a90604b77eb18dbd2f8d628d66653c40717adb74fcf51d48cac36b8f3a506f791f4c526d3969e89007bf973b59eef387748984d
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,5 @@
|
|
1
|
+
## 2.0.0
|
2
|
+
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
3
|
+
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
4
|
+
- Dependency on logstash-core update to 2.0
|
5
|
+
|
@@ -52,7 +52,7 @@ require "logstash/plugin_mixins/aws_config"
|
|
52
52
|
# by their metric name (either a default or from their `CW_metricname` field)
|
53
53
|
#
|
54
54
|
# Other fields which can be added to events to modify the behavior of this
|
55
|
-
# plugin are, `CW_namespace`, `CW_unit`, `CW_value`, and
|
55
|
+
# plugin are, `CW_namespace`, `CW_unit`, `CW_value`, and
|
56
56
|
# `CW_dimensions`. All of these field names are configurable in
|
57
57
|
# this output. You can also set per-output defaults for any of them.
|
58
58
|
# See below for details.
|
@@ -62,7 +62,7 @@ require "logstash/plugin_mixins/aws_config"
|
|
62
62
|
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html[PutMetricData]
|
63
63
|
class LogStash::Outputs::CloudWatch < LogStash::Outputs::Base
|
64
64
|
include LogStash::PluginMixins::AwsConfig
|
65
|
-
|
65
|
+
|
66
66
|
config_name "cloudwatch"
|
67
67
|
|
68
68
|
# Constants
|
@@ -79,7 +79,7 @@ class LogStash::Outputs::CloudWatch < LogStash::Outputs::Base
|
|
79
79
|
COUNT_UNIT = "Count"
|
80
80
|
NONE = "None"
|
81
81
|
|
82
|
-
# How often to send data to CloudWatch
|
82
|
+
# How often to send data to CloudWatch
|
83
83
|
# This does not affect the event timestamps, events will always have their
|
84
84
|
# actual timestamp (to-the-minute) sent to CloudWatch.
|
85
85
|
#
|
@@ -88,27 +88,27 @@ class LogStash::Outputs::CloudWatch < LogStash::Outputs::Base
|
|
88
88
|
# See the Rufus Scheduler docs for an https://github.com/jmettraux/rufus-scheduler#the-time-strings-understood-by-rufus-scheduler[explanation of allowed values]
|
89
89
|
config :timeframe, :validate => :string, :default => "1m"
|
90
90
|
|
91
|
-
# How many events to queue before forcing a call to the CloudWatch API ahead of `timeframe` schedule
|
91
|
+
# How many events to queue before forcing a call to the CloudWatch API ahead of `timeframe` schedule
|
92
92
|
# Set this to the number of events-per-timeframe you will be sending to CloudWatch to avoid extra API calls
|
93
93
|
config :queue_size, :validate => :number, :default => 10000
|
94
94
|
|
95
95
|
# The default namespace to use for events which do not have a `CW_namespace` field
|
96
96
|
config :namespace, :validate => :string, :default => "Logstash"
|
97
97
|
|
98
|
-
# The name of the field used to set a different namespace per event
|
98
|
+
# The name of the field used to set a different namespace per event
|
99
99
|
# Note: Only one namespace can be sent to CloudWatch per API call
|
100
100
|
# so setting different namespaces will increase the number of API calls
|
101
101
|
# and those cost money.
|
102
102
|
config :field_namespace, :validate => :string, :default => "CW_namespace"
|
103
103
|
|
104
|
-
# The default metric name to use for events which do not have a `CW_metricname` field.
|
104
|
+
# The default metric name to use for events which do not have a `CW_metricname` field.
|
105
105
|
# Beware: If this is provided then all events which pass through this output will be aggregated and
|
106
106
|
# sent to CloudWatch, so use this carefully. Furthermore, when providing this option, you
|
107
107
|
# will probably want to also restrict events from passing through this output using event
|
108
108
|
# type, tag, and field matching
|
109
109
|
config :metricname, :validate => :string
|
110
110
|
|
111
|
-
# The name of the field used to set the metric name on an event
|
111
|
+
# The name of the field used to set the metric name on an event
|
112
112
|
# The author of this plugin recommends adding this field to events in inputs &
|
113
113
|
# filters rather than using the per-output default setting so that one output
|
114
114
|
# plugin on your logstash indexer can serve all events (which of course had
|
@@ -123,26 +123,26 @@ class LogStash::Outputs::CloudWatch < LogStash::Outputs::Base
|
|
123
123
|
"Bits/Second", "Kilobits/Second", "Megabits/Second",
|
124
124
|
"Gigabits/Second", "Terabits/Second", "Count/Second", NONE]
|
125
125
|
|
126
|
-
# The default unit to use for events which do not have a `CW_unit` field
|
126
|
+
# The default unit to use for events which do not have a `CW_unit` field
|
127
127
|
# If you set this option you should probably set the "value" option along with it
|
128
128
|
config :unit, :validate => VALID_UNITS, :default => COUNT_UNIT
|
129
129
|
|
130
|
-
# The name of the field used to set the unit on an event metric
|
130
|
+
# The name of the field used to set the unit on an event metric
|
131
131
|
config :field_unit, :validate => :string, :default => "CW_unit"
|
132
132
|
|
133
|
-
# The default value to use for events which do not have a `CW_value` field
|
133
|
+
# The default value to use for events which do not have a `CW_value` field
|
134
134
|
# If provided, this must be a string which can be converted to a float, for example...
|
135
135
|
# "1", "2.34", ".5", and "0.67"
|
136
136
|
# If you set this option you should probably set the `unit` option along with it
|
137
137
|
config :value, :validate => :string, :default => "1"
|
138
138
|
|
139
|
-
# The name of the field used to set the value (float) on an event metric
|
139
|
+
# The name of the field used to set the value (float) on an event metric
|
140
140
|
config :field_value, :validate => :string, :default => "CW_value"
|
141
141
|
|
142
|
-
# The default dimensions [ name, value, ... ] to use for events which do not have a `CW_dimensions` field
|
142
|
+
# The default dimensions [ name, value, ... ] to use for events which do not have a `CW_dimensions` field
|
143
143
|
config :dimensions, :validate => :hash
|
144
144
|
|
145
|
-
# The name of the field used to set the dimensions on an event metric
|
145
|
+
# The name of the field used to set the dimensions on an event metric
|
146
146
|
# The field named here, if present in an event, must have an array of
|
147
147
|
# one or more key & value pairs, for example...
|
148
148
|
# `add_field => [ "CW_dimensions", "Environment", "CW_dimensions", "prod" ]`
|
@@ -157,7 +157,7 @@ class LogStash::Outputs::CloudWatch < LogStash::Outputs::Base
|
|
157
157
|
:cloud_watch_endpoint => "monitoring.#{region}.amazonaws.com"
|
158
158
|
}
|
159
159
|
end
|
160
|
-
|
160
|
+
|
161
161
|
public
|
162
162
|
def register
|
163
163
|
require "thread"
|
@@ -176,13 +176,12 @@ class LogStash::Outputs::CloudWatch < LogStash::Outputs::Base
|
|
176
176
|
|
177
177
|
public
|
178
178
|
def receive(event)
|
179
|
-
|
179
|
+
|
180
180
|
|
181
181
|
if event == LogStash::SHUTDOWN
|
182
182
|
job.trigger()
|
183
183
|
job.unschedule()
|
184
184
|
@logger.info("CloudWatch aggregator thread shutdown.")
|
185
|
-
finished
|
186
185
|
return
|
187
186
|
end
|
188
187
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-cloudwatch'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.1'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This output lets you aggregate and send metric data to AWS CloudWatch"
|
7
7
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
|
21
21
|
|
22
22
|
# Gem dependencies
|
23
|
-
s.add_runtime_dependency "logstash-core", "
|
23
|
+
s.add_runtime_dependency "logstash-core", ">= 2.0.0.snapshot", "< 3.0.0"
|
24
24
|
s.add_runtime_dependency 'logstash-mixin-aws'
|
25
25
|
s.add_runtime_dependency 'rufus-scheduler', [ '~> 3.0.9' ]
|
26
26
|
s.add_runtime_dependency 'aws-sdk'
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-cloudwatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- -
|
16
|
+
- - '>='
|
17
17
|
- !ruby/object:Gem::Version
|
18
18
|
version: 2.0.0.snapshot
|
19
|
+
- - <
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.0.0
|
19
22
|
name: logstash-core
|
20
23
|
prerelease: false
|
21
24
|
type: :runtime
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 2.0.0.snapshot
|
30
|
+
- - <
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.0.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
29
35
|
requirements:
|