sensu-plugins-logstash 1.1.0 → 1.1.1

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: 4a2d687c679ae0fe582beb5778e4db2f4e12bf62
4
- data.tar.gz: 272f841956109a14fd161b0023836422eb10f78a
3
+ metadata.gz: 1dd508763a1de6a8422e45a002377ab160cd3729
4
+ data.tar.gz: 3d3b335b66d9a689de0a01a8f0868052530cdc94
5
5
  SHA512:
6
- metadata.gz: d238bf0b47db82d88f16b00b0c158f317b8f6e232e11226989f0ffedc83a1122d334e33a59bfb141b26c807b22aa12f146a12641b71a90f64d1a767b3cb5b782
7
- data.tar.gz: a5cfddbd9c76a97c2d10aefcb8692534ae42df199fab04e0e6b9d7e1d6bb5148186fe108c1499ac90b9b68e765d5b1480940925cec0d865ad0d9213b10034da8
6
+ metadata.gz: fed9e9d92aeeedbf0e894355363daa55efac73a954187bd3f3af5adf22b0ce0170abdea386cb6417ad08d562579d7446b3ba12aaeb145c6f5f908b257009329d
7
+ data.tar.gz: 5996ca6076b6f2332537720d52047a6bc2f9d8e09120a382c5e4e010ee4ec71e67235fb7d0c456dea758231ab20c599dfb41c63b107765ec67c4cc3c2a23e084
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.1.1] - 2017-08-26
9
+ ### Fixed
10
+ - locking runtime dependency and misc changes to `metrics-logstash-node.rb` (@multani)
11
+
12
+
8
13
  ## [1.1.0] - 2017-07-27
9
14
  ## Added
10
15
  - test with ruby 2.4 as sensu now ships with it. (@majormoses)
@@ -46,7 +51,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
46
51
  ### Added
47
52
  - initial release
48
53
 
49
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/1.1.0...HEAD
54
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/1.1.1...HEAD
55
+ [1.1.1]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/1.1.0...1.1.1
50
56
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/1.0.0...1.1.0
51
57
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/0.1.1...1.0.0
52
58
  [0.1.1]: https://github.com/sensu-plugins/sensu-plugins-logstash/compare/0.1.0...0.1.1
@@ -1,10 +1,10 @@
1
1
  #! /usr/bin/env ruby
2
2
  #
3
- # logstash-node-metrics
3
+ # metrics-logstash-node
4
4
  #
5
5
  # DESCRIPTION:
6
- # This plugin uses the Logstash API to collect metrics, producing a JSON
7
- # document which is outputted to STDOUT. An exit status of 0 indicates
6
+ # This plugin uses the Logstash node info API to collect metrics, producing a
7
+ # JSON document which is outputted to STDOUT. An exit status of 0 indicates
8
8
  # the plugin has successfully collected and produced.
9
9
  #
10
10
  # OUTPUT:
@@ -35,35 +35,35 @@ require 'json'
35
35
  require 'base64'
36
36
 
37
37
  #
38
- # ES Node Metrics
38
+ # Logstash Node Metrics
39
39
  #
40
- class ESMetrics < Sensu::Plugin::Metric::CLI::Graphite
40
+ class LogstashNodeMetrics < Sensu::Plugin::Metric::CLI::Graphite
41
41
  option :scheme,
42
- description: 'Metric naming scheme, text to prepend to queue_name.metric',
42
+ description: 'Metric naming scheme, text to prepend to metrics',
43
43
  short: '-s SCHEME',
44
44
  long: '--scheme SCHEME',
45
45
  default: "#{Socket.gethostname}.logstash"
46
46
 
47
47
  option :host,
48
- description: 'Elasticsearch server host.',
48
+ description: 'Logstash server host',
49
49
  short: '-h HOST',
50
50
  long: '--host HOST',
51
51
  default: 'localhost'
52
52
 
53
53
  option :port,
54
- description: 'Elasticsearch port',
54
+ description: 'Logstash monitoring port',
55
55
  short: '-p PORT',
56
56
  long: '--port PORT',
57
57
  proc: proc(&:to_i),
58
58
  default: 9600
59
59
 
60
60
  option :user,
61
- description: 'Elasticsearch User',
61
+ description: 'Logstash user',
62
62
  short: '-u USER',
63
63
  long: '--user USER'
64
64
 
65
65
  option :password,
66
- description: 'Elasticsearch Password',
66
+ description: 'Logstash password',
67
67
  short: '-P PASS',
68
68
  long: '--password PASS'
69
69
 
@@ -72,7 +72,7 @@ class ESMetrics < Sensu::Plugin::Metric::CLI::Graphite
72
72
  short: '-e',
73
73
  long: '--https'
74
74
 
75
- def get_es_resource(resource)
75
+ def get_logstash_resource(resource)
76
76
  headers = {}
77
77
  if config[:user] && config[:password]
78
78
  auth = 'Basic ' + Base64.encode64("#{config[:user]}:#{config[:password]}").chomp
@@ -94,7 +94,7 @@ class ESMetrics < Sensu::Plugin::Metric::CLI::Graphite
94
94
  end
95
95
 
96
96
  def run # rubocop:disable Metrics/AbcSize
97
- stats = get_es_resource('/_node/stats')
97
+ stats = get_logstash_resource('/_node/stats')
98
98
 
99
99
  timestamp = Time.now.to_i
100
100
  node = stats
@@ -2,7 +2,7 @@ module SensuPluginsLogstash
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
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: 1.1.0
4
+ version: 1.1.1
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: 2017-07-27 00:00:00.000000000 Z
11
+ date: 2017-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.2.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: rest-client
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 2.0.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 2.0.2
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: sensu-plugin
43
57
  requirement: !ruby/object:Gem::Requirement