flexciton-logstash-output-opsgenie 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/outputs/opsgenie.rb +7 -5
- data/logstash-output-opsgenie.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34a1e3ca52554902ba67056b1359f82ae6d1a5e92bd0cf5dd5b2862b22822a1c
|
4
|
+
data.tar.gz: 175bd9c7866726b5c466cbaaee1bca001b3ebe5f3915e058f3ed5f5bdbb25c5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6157fb6cc89687064bd9dbce6ff6d88f5988f5fe889e9afe202542d78056574d4e430ed30dff22abbb86f41bd6d9be2774d4d6a15c8014af383eb956aae0e18
|
7
|
+
data.tar.gz: c11dd7a785043177b0eb95e2aa112fffcb81d2abbd9d925d33d7f64d2e2b8f2235c4138530dfd0d5ff65a61fe4446ac89ed8dd87fb6e3266de00605d1660e9e8
|
@@ -7,10 +7,11 @@ require "net/http"
|
|
7
7
|
require "net/https"
|
8
8
|
|
9
9
|
|
10
|
-
|
10
|
+
CATCHABLE_EXCEPTIONS = [
|
11
11
|
Errno::EINVAL,
|
12
12
|
Net::HTTPBadResponse,
|
13
13
|
Net::HTTPHeaderSyntaxError,
|
14
|
+
JSON::ParserError,
|
14
15
|
]
|
15
16
|
|
16
17
|
RETRYABLE_HTTP_EXCEPTIONS = [
|
@@ -204,7 +205,11 @@ class LogStash::Outputs::OpsGenie < LogStash::Outputs::Base
|
|
204
205
|
)
|
205
206
|
request.body = params.to_json
|
206
207
|
response = http.request(request)
|
207
|
-
|
208
|
+
|
209
|
+
body = response.body
|
210
|
+
body = JSON.parse(body)
|
211
|
+
@logger.warn("Executed [#{uri}]. Response:[#{body}]")
|
212
|
+
rescue *CATCHABLE_EXCEPTIONS => e
|
208
213
|
@logger.warn("Silencing exception in logstash opsgenie outputs: [#{e.class}: #{e.message}]")
|
209
214
|
return
|
210
215
|
rescue *RETRYABLE_HTTP_EXCEPTIONS => e
|
@@ -221,9 +226,6 @@ class LogStash::Outputs::OpsGenie < LogStash::Outputs::Base
|
|
221
226
|
end
|
222
227
|
end
|
223
228
|
|
224
|
-
body = response.body
|
225
|
-
body = JSON.parse(body)
|
226
|
-
@logger.warn("Executed [#{uri}]. Response:[#{body}]")
|
227
229
|
end
|
228
230
|
end # def executePost
|
229
231
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'flexciton-logstash-output-opsgenie'
|
3
|
-
s.version = '
|
3
|
+
s.version = '2.0.0'
|
4
4
|
s.licenses = ["Apache-2.0"]
|
5
5
|
s.summary = "Flexciton Logstash Output Opsgenie plugin allows creation, closing, acknowledging and adding notes to alerts in OpsGenie."
|
6
6
|
s.description = "Install this gem on your Logstash instance with: $LS_HOME/bin/logstash-plugin install flexciton-logstash-output-opsgenie. Includes retry and silencing mechanism for network errors."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexciton-logstash-output-opsgenie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flexciton Ltd, Tomasz Kluczkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|