sensu-plugins-logstash 2.0.0 → 2.1.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/bin/metrics-logstash-node.rb +60 -26
- data/lib/sensu-plugins-logstash/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 966b4e25ca6abb9e58691dae1244bb3dd5c0408a131177f6f100de35655ae727
|
4
|
+
data.tar.gz: f6d8b6a6384a49f3706c3211216a74ed7ab1995ba354043eb6b094d77a0dff97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e337022bc4b973063dcafc5c03d4d89a8b67c7c6818c343cd4a61bde6187b03d36ce8f2060901b20dea4d7df3a0c846fa3ff95fb0ccc31a41f2f61453cc8666
|
7
|
+
data.tar.gz: 2a9d811058cf74e9d6e9e361ca46c3f61eb13be316f04ff7e26085f76c88644c5f05ab65a90d3bd55932e49ebe76e1841f089ec76ad29de6656e14bc8291f99e
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [2.1.0] - 2018-03-14
|
9
|
+
### Added
|
10
|
+
- Support for Logstash 6.x node stats metrics (@runningman84, @Evesy)
|
11
|
+
|
8
12
|
## [2.0.0] - 2017-11-07
|
9
13
|
### Breaking Changes
|
10
14
|
- metrics-logstash-node.rb: Added plugin name into pipeline metrics (@Evesy)
|
@@ -67,6 +71,7 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
67
71
|
- initial release
|
68
72
|
|
69
73
|
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/2.0.0...HEAD
|
74
|
+
[2.1.0]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/2.0.0...2.1.0
|
70
75
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/1.3.0...2.0.0
|
71
76
|
[1.3.0]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/1.2.0...1.3.0
|
72
77
|
[1.2.0]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/1.1.1...1.2.0
|
@@ -24,7 +24,7 @@
|
|
24
24
|
#
|
25
25
|
# LICENSE:
|
26
26
|
# Copyright 2011 Sonian, Inc <chefs@sonian.net>
|
27
|
-
# Copyright
|
27
|
+
# Copyright 2018 Philipp Hellmich <phil@hellmi.de>
|
28
28
|
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
29
29
|
# for details.
|
30
30
|
#
|
@@ -113,31 +113,65 @@ class LogstashNodeMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
113
113
|
metrics['process.peak_open_file_descriptors'] = node['process']['peak_open_file_descriptors']
|
114
114
|
metrics['process.max_file_descriptors'] = node['process']['max_file_descriptors']
|
115
115
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
item['events']['
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
116
|
+
# logstash < 6.0
|
117
|
+
if node.key?('pipeline')
|
118
|
+
node['pipeline']['events'].each do |key, value|
|
119
|
+
metrics["pipeline.events.#{key}"] = value
|
120
|
+
end
|
121
|
+
|
122
|
+
node['pipeline']['plugins']['inputs'].each do |item|
|
123
|
+
item['events'] = {} unless item.key?('events')
|
124
|
+
metrics["pipeline.plugins.inputs.#{item['name']}.#{item['id']}.events.in"] = item['events']['in'].to_i || 0
|
125
|
+
metrics["pipeline.plugins.inputs.#{item['name']}.#{item['id']}.events.out"] = item['events']['out'].to_i || 0
|
126
|
+
metrics["pipeline.plugins.inputs.#{item['name']}.#{item['id']}.events.queue_push_duration_in_millis"] = \
|
127
|
+
item['events']['queue_push_duration_in_millis'].to_i || 0
|
128
|
+
end
|
129
|
+
|
130
|
+
node['pipeline']['plugins']['filters'].each do |item|
|
131
|
+
metrics["pipeline.plugins.filters.#{item['name']}.#{item['id']}.events.out"] = item['events']['out'].to_i || 0
|
132
|
+
metrics["pipeline.plugins.filters.#{item['name']}.#{item['id']}.events.duration_in_millis"] = item['events']['duration_in_millis'].to_i || 0
|
133
|
+
metrics["pipeline.plugins.filters.#{item['name']}.#{item['id']}.matches"] = item['matches'].to_i if item.key?('matches')
|
134
|
+
end
|
135
|
+
|
136
|
+
node['pipeline']['plugins']['outputs'].each do |item|
|
137
|
+
item['events'] = {} unless item.key?('events')
|
138
|
+
metrics["pipeline.plugins.outputs.#{item['name']}.#{item['id']}.events.in"] = item['events']['in'].to_i || 0
|
139
|
+
metrics["pipeline.plugins.outputs.#{item['name']}.#{item['id']}.events.out"] = item['events']['out'].to_i || 0
|
140
|
+
metrics["pipeline.plugins.outputs.#{item['name']}.#{item['id']}.events.duration_in_millis"] = item['events']['duration_in_millis'].to_i || 0
|
141
|
+
end
|
142
|
+
# logstash >= 6.0
|
143
|
+
elsif node.key?('pipelines')
|
144
|
+
node['pipelines'].each_key do |pipeline|
|
145
|
+
if node['pipelines'][pipeline]['events'].nil? || node['pipelines'][pipeline]['events'] == 'null'
|
146
|
+
# Skip
|
147
|
+
else
|
148
|
+
node['pipelines'][pipeline]['events'].each do |key, value|
|
149
|
+
metrics["pipelines.#{pipeline}.events.#{key}"] = value
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
node['pipelines'][pipeline]['plugins']['inputs'].each do |item|
|
154
|
+
item['events'] = {} unless item.key?('events')
|
155
|
+
metrics["pipelines.#{pipeline}.plugins.inputs.#{item['name']}.#{item['id']}.events.in"] = item['events']['in'].to_i || 0
|
156
|
+
metrics["pipelines.#{pipeline}.plugins.inputs.#{item['name']}.#{item['id']}.events.out"] = item['events']['out'].to_i || 0
|
157
|
+
metrics["pipelines.#{pipeline}.plugins.inputs.#{item['name']}.#{item['id']}.events.queue_push_duration_in_millis"] = item['events']['queue_push_duration_in_millis'].to_i || 0 # rubocop:disable Metrics/LineLength
|
158
|
+
end
|
159
|
+
|
160
|
+
node['pipelines'][pipeline]['plugins']['filters'].each do |item|
|
161
|
+
item['events'] = {} unless item.key?('events')
|
162
|
+
metrics["pipelines.#{pipeline}.plugins.filters.#{item['name']}.#{item['id']}.events.in"] = item['events']['in'].to_i || 0
|
163
|
+
metrics["pipelines.#{pipeline}.plugins.filters.#{item['name']}.#{item['id']}.events.out"] = item['events']['out'].to_i || 0
|
164
|
+
metrics["pipelines.#{pipeline}.plugins.filters.#{item['name']}.#{item['id']}.events.duration_in_millis"] = item['events']['duration_in_millis'].to_i || 0 # rubocop:disable Metrics/LineLength
|
165
|
+
metrics["pipelines.#{pipeline}.plugins.filters.#{item['name']}.#{item['id']}.matches"] = item['matches'].to_i if item.key?('matches')
|
166
|
+
end
|
167
|
+
|
168
|
+
node['pipelines'][pipeline]['plugins']['outputs'].each do |item|
|
169
|
+
item['events'] = {} unless item.key?('events')
|
170
|
+
metrics["pipelines.#{pipeline}.plugins.outputs.#{item['name']}.#{item['id']}.events.in"] = item['events']['in'].to_i || 0
|
171
|
+
metrics["pipelines.#{pipeline}.plugins.outputs.#{item['name']}.#{item['id']}.events.out"] = item['events']['out'].to_i || 0
|
172
|
+
metrics["pipelines.#{pipeline}.plugins.outputs.#{item['name']}.#{item['id']}.events.duration_in_millis"] = item['events']['duration_in_millis'].to_i || 0 # rubocop:disable Metrics/LineLength
|
173
|
+
end
|
174
|
+
end
|
141
175
|
end
|
142
176
|
|
143
177
|
metrics.each do |k, v|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-logstash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
250
|
version: '0'
|
251
251
|
requirements: []
|
252
252
|
rubyforge_project:
|
253
|
-
rubygems_version: 2.7.
|
253
|
+
rubygems_version: 2.7.6
|
254
254
|
signing_key:
|
255
255
|
specification_version: 4
|
256
256
|
summary: Sensu plugins for working with logstash
|