logstash-output-nagios 2.0.4 → 3.0.0

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: b30f157541e1e40fa1e6e73a5b807da87658971a
4
- data.tar.gz: 091636174daa77c7b5a46c7bfaba29b45eb8c003
3
+ metadata.gz: 5c1a7e75a976c8b39b60385925b065741350fd5f
4
+ data.tar.gz: 73af598c4c39a718809fcb748efa513c513c55ed
5
5
  SHA512:
6
- metadata.gz: c8c31d53353b6edb0b53abc841a631bd2912abda68cd6b38908e60b768a960fe5fd3393fa6f5201436f86460382e339bb4aa1e917107a0bcaaa62c05070cd580
7
- data.tar.gz: 71907acadfa4d1636123337a764c0f334571dc42ec932b2fe0ad20285bb7981d3b930c285103c3b6e9dc7db1588a1edb2a4c232ec2d9ebc85c3cdc50db8b4336
6
+ metadata.gz: 4d8b9dcedb34c10de54f2670fec56111094184c107cf11ed427603b5303013c1ecd1b083b3e9a07a5e05fc92dcbb800e6f2a0baaa5e7fb297013147566f9ed66
7
+ data.tar.gz: 6cca3c70001c81bb01d4d085af9a821f6ecfa8b7510a400b9ee8af0f47747117e55d88410ce605257b2fb9f24f6255222f02dfc4549c33b489cee8368d379be5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ ## 3.0.0
2
+ - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
1
3
  # 2.0.4
2
4
  - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
5
  # 2.0.3
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
2
+
3
+ # Specify your gem's dependencies in logstash-mass_effect.gemspec
4
+ gemspec
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Logstash Plugin
2
2
 
3
- [![Build
4
- Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Outputs/job/logstash-plugin-output-nagios-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Outputs/job/logstash-plugin-output-nagios-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-output-nagios.svg)](https://travis-ci.org/logstash-plugins/logstash-output-nagios)
5
4
 
6
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
7
6
 
@@ -56,7 +55,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
56
55
  ```
57
56
  - Install plugin
58
57
  ```sh
58
+ # Logstash 2.3 and higher
59
+ bin/logstash-plugin install --no-verify
60
+
61
+ # Prior to Logstash 2.3
59
62
  bin/plugin install --no-verify
63
+
60
64
  ```
61
65
  - Run Logstash with your plugin
62
66
  ```sh
@@ -74,7 +78,12 @@ gem build logstash-filter-awesome.gemspec
74
78
  ```
75
79
  - Install the plugin from the Logstash home
76
80
  ```sh
77
- bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
81
+ # Logstash 2.3 and higher
82
+ bin/logstash-plugin install --no-verify
83
+
84
+ # Prior to Logstash 2.3
85
+ bin/plugin install --no-verify
86
+
78
87
  ```
79
88
  - Start Logstash and proceed to test the plugin
80
89
 
@@ -60,25 +60,25 @@ class LogStash::Outputs::Nagios < LogStash::Outputs::Base
60
60
  # array indexes (host/service combos) and the arrays must be the same
61
61
  # length.
62
62
 
63
- host = event["nagios_host"]
63
+ host = event.get("nagios_host")
64
64
  if !host
65
65
  @logger.warn("Skipping nagios output; nagios_host field is missing",
66
66
  :missed_event => event)
67
67
  return
68
68
  end
69
69
 
70
- service = event["nagios_service"]
70
+ service = event.get("nagios_service")
71
71
  if !service
72
72
  @logger.warn("Skipping nagios output; nagios_service field is missing",
73
73
  "missed_event" => event)
74
74
  return
75
75
  end
76
76
 
77
- annotation = event["nagios_annotation"]
77
+ annotation = event.get("nagios_annotation")
78
78
  level = @nagios_level
79
79
 
80
- if event["nagios_level"]
81
- event_level = [*event["nagios_level"]]
80
+ if event.get("nagios_level")
81
+ event_level = [*event.get("nagios_level")]
82
82
  case event_level[0].downcase
83
83
  when "ok"
84
84
  level = "0"
@@ -98,7 +98,7 @@ class LogStash::Outputs::Nagios < LogStash::Outputs::Base
98
98
  cmd += "#{annotation}: "
99
99
  end
100
100
  # In the multi-line case, escape the newlines for the nagios command file
101
- cmd += (event["message"] || "<no message>").gsub("\n", "\\n")
101
+ cmd += (event.get("message") || "<no message>").gsub("\n", "\\n")
102
102
 
103
103
  @logger.debug("Opening nagios command file", :commandfile => @commandfile,
104
104
  :nagios_command => cmd)
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-nagios'
4
- s.version = '2.0.4'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The Nagios output is used for sending passive check results to Nagios via the Nagios command file"
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"
7
+ s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
8
8
  s.authors = ["Elastic"]
9
9
  s.email = 'info@elastic.co'
10
10
  s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
@@ -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-plugin-api", "~> 1.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
24
24
  s.add_runtime_dependency 'logstash-codec-plain'
25
25
 
26
26
  s.add_development_dependency 'logstash-devutils'
metadata CHANGED
@@ -1,58 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-nagios
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: logstash-core-plugin-api
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: '1.0'
19
- name: logstash-core-plugin-api
20
- prerelease: false
19
+ version: '2.0'
21
20
  type: :runtime
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
+ name: logstash-codec-plain
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
- name: logstash-codec-plain
34
- prerelease: false
35
34
  type: :runtime
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
+ name: logstash-devutils
42
43
  requirement: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - ">="
45
46
  - !ruby/object:Gem::Version
46
47
  version: '0'
47
- name: logstash-devutils
48
- prerelease: false
49
48
  type: :development
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- 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
55
+ description: This gem is a Logstash plugin required to be installed on top of the
56
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
57
+ gem is not a stand-alone program
56
58
  email: info@elastic.co
57
59
  executables: []
58
60
  extensions: []
@@ -74,7 +76,7 @@ licenses:
74
76
  metadata:
75
77
  logstash_plugin: 'true'
76
78
  logstash_group: output
77
- post_install_message:
79
+ post_install_message:
78
80
  rdoc_options: []
79
81
  require_paths:
80
82
  - lib
@@ -89,11 +91,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
91
  - !ruby/object:Gem::Version
90
92
  version: '0'
91
93
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 2.4.8
94
- signing_key:
94
+ rubyforge_project:
95
+ rubygems_version: 2.5.1
96
+ signing_key:
95
97
  specification_version: 4
96
- summary: The Nagios output is used for sending passive check results to Nagios via the Nagios command file
98
+ summary: The Nagios output is used for sending passive check results to Nagios via
99
+ the Nagios command file
97
100
  test_files:
98
101
  - spec/outputs/nagios_spec.rb
99
102
  - spec/spec_helper.rb