logstash-output-zabbix 2.0.2 → 3.0.0
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 -1
- data/README.md +12 -3
- data/lib/logstash/outputs/zabbix.rb +8 -8
- data/logstash-output-zabbix.gemspec +4 -4
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cd59a78de80ccd5503a765b91817ebbbc731444
|
4
|
+
data.tar.gz: 47fc4a6fa10b9f34c76975d461980b5824249a90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07eab4e762c6da79f06a73e7c8d02e97b471754ae58c1ead3ccf2da4559dd4934a90e9d5e13f417430b78e82a49c4bb51d0eeb1cf685ee8ac01bf29cb9b86958
|
7
|
+
data.tar.gz: 378d8de40cfe8d6ae19c4cb563177fcc5be3e5c915b7fa848e9d2e70b23786bc09c5087d2d5e7e6289e611f2274b89b17b813b2e703e8ba38cc5c3d5cd353aa5
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 3.0.0
|
2
|
+
- Breaking: Updated plugin to use new Java Event APIs
|
3
|
+
- Use zabbix_protocol 0.1.5 or greater (tasty fixes for Zabbix)
|
4
|
+
- Make TravisCI use JRuby 1.7.25, and have Travis run the unit & integration tests.
|
1
5
|
# 2.0.2
|
2
6
|
- Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
|
3
7
|
# 2.0.1
|
@@ -7,4 +11,4 @@
|
|
7
11
|
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
8
12
|
- Dependency on logstash-core update to 2.0
|
9
13
|
- Update to allow semicolons (or not, e.g. Zabbix 2.0). #6 (davmrtl)
|
10
|
-
- Update to prevent Logstash from crashing when the Zabbix server becomes unavailable while the plugin is sending data. #9 (dkanbier)
|
14
|
+
- Update to prevent Logstash from crashing when the Zabbix server becomes unavailable while the plugin is sending data. #9 (dkanbier)
|
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-zabbix-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Outputs/job/logstash-plugin-output-zabbix-unit/)
|
3
|
+
[![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-output-zabbix.svg)](https://travis-ci.org/logstash-plugins/logstash-output-zabbix)
|
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
|
-
|
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
|
|
@@ -104,7 +104,7 @@ class LogStash::Outputs::Zabbix < LogStash::Outputs::Base
|
|
104
104
|
|
105
105
|
public
|
106
106
|
def field_check(event, fieldname)
|
107
|
-
if !event
|
107
|
+
if !event.get(fieldname)
|
108
108
|
@logger.warn("Field referenced by #{fieldname} is missing")
|
109
109
|
false
|
110
110
|
else
|
@@ -142,10 +142,10 @@ class LogStash::Outputs::Zabbix < LogStash::Outputs::Base
|
|
142
142
|
data = []
|
143
143
|
(0..validated.length-1).step(2) do |idx|
|
144
144
|
data << {
|
145
|
-
"host" => event
|
146
|
-
"key" => event
|
147
|
-
"value" => event
|
148
|
-
"clock" => event
|
145
|
+
"host" => event.get(@zabbix_host),
|
146
|
+
"key" => event.get(validated[idx]),
|
147
|
+
"value" => event.get(validated[idx+1]),
|
148
|
+
"clock" => event.get("@timestamp").to_i
|
149
149
|
}
|
150
150
|
end
|
151
151
|
{
|
@@ -183,12 +183,12 @@ class LogStash::Outputs::Zabbix < LogStash::Outputs::Base
|
|
183
183
|
total = info[5].to_i
|
184
184
|
if failed == total
|
185
185
|
@logger.warn("Zabbix server at #{@zabbix_server_host} rejected all items sent.",
|
186
|
-
:zabbix_host => event
|
186
|
+
:zabbix_host => event.get(@zabbix_host)
|
187
187
|
)
|
188
188
|
false
|
189
189
|
elsif failed > 0
|
190
190
|
@logger.warn("Zabbix server at #{@zabbix_server_host} rejected #{info[3]} item(s).",
|
191
|
-
:zabbix_host => event
|
191
|
+
:zabbix_host => event.get(@zabbix_host)
|
192
192
|
)
|
193
193
|
false
|
194
194
|
elsif failed == 0 && total > 0
|
@@ -237,7 +237,7 @@ class LogStash::Outputs::Zabbix < LogStash::Outputs::Base
|
|
237
237
|
|
238
238
|
public
|
239
239
|
def receive(event)
|
240
|
-
|
240
|
+
|
241
241
|
return unless field_check(event, @zabbix_host)
|
242
242
|
send_to_zabbix(event)
|
243
243
|
end # def event
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-zabbix'
|
3
|
-
s.version = '
|
3
|
+
s.version = '3.0.0'
|
4
4
|
s.licenses = ["Apache License (2.0)"]
|
5
5
|
s.summary = "This output sends key/value pairs to a Zabbix server."
|
6
|
-
s.description
|
6
|
+
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"
|
7
7
|
s.authors = ["Elastic"]
|
8
8
|
s.email = "info@elastic.co"
|
9
9
|
s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
|
@@ -18,8 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
|
19
19
|
|
20
20
|
# Gem dependencies
|
21
|
-
s.add_runtime_dependency "logstash-core-plugin-api", "~>
|
22
|
-
s.add_runtime_dependency "zabbix_protocol"
|
21
|
+
s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
|
22
|
+
s.add_runtime_dependency "zabbix_protocol", ">= 0.1.5"
|
23
23
|
s.add_runtime_dependency "logstash-codec-plain"
|
24
24
|
s.add_development_dependency "logstash-devutils", ">= 0.0.12"
|
25
25
|
s.add_development_dependency "logstash-filter-mutate"
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-zabbix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-21 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
|
-
version: '
|
18
|
+
version: '2.0'
|
19
19
|
name: logstash-core-plugin-api
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,13 +23,13 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 0.1.5
|
33
33
|
name: zabbix_protocol
|
34
34
|
prerelease: false
|
35
35
|
type: :runtime
|
@@ -37,7 +37,7 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.1.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description: This gem is a
|
97
|
+
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
|
98
98
|
email: info@elastic.co
|
99
99
|
executables: []
|
100
100
|
extensions: []
|