fluent-plugin-unomaly 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/fluent-plugin-unomaly.gemspec +1 -1
- data/lib/fluent/plugin/out_unomaly.rb +10 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0c3c705ac1b37ab42e34ded472e7a016123ccd9a2efedd223229757dfb22f66
|
4
|
+
data.tar.gz: ab149b78ef7b06f3221b0dcad6912c7fc2ad9e3f08a437501cc11c18489742d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a2d57914ec526b811e02176444149653bdbe1001d1e5aaded859fa02512f9eb71d7f85d00335ce28832cca20731bf21a4d924cc73f364126564c3d8173dbb1d
|
7
|
+
data.tar.gz: 113931a6d2afbde7f69dc8c9d17f5ccccc9dd5366904df1deeb97212d3fd623535b83e656c085494892050c422becb1f5a728e6384c538097913b5690ad4b351
|
data/CHANGELOG.md
CHANGED
@@ -82,8 +82,11 @@ module Fluent
|
|
82
82
|
metadata.delete(@message_key)
|
83
83
|
metadata["tag"]=tag
|
84
84
|
|
85
|
-
unomaly_event["metadata"]=
|
85
|
+
unomaly_event["metadata"]=metadata.to_json
|
86
86
|
|
87
|
+
if @debug
|
88
|
+
log.info "Event #{unomaly_event.to_json}"
|
89
|
+
end
|
87
90
|
documents.push(unomaly_event)
|
88
91
|
end
|
89
92
|
send_batch(documents)
|
@@ -92,13 +95,16 @@ module Fluent
|
|
92
95
|
def send_batch(events)
|
93
96
|
url = @host + @api_path
|
94
97
|
body = events.to_json
|
98
|
+
ssl = url.start_with?('https')
|
95
99
|
uri = URI.parse(url)
|
96
100
|
header = {'Content-Type' => 'application/json'}
|
97
101
|
|
98
102
|
http = Net::HTTP.new(uri.host, uri.port)
|
99
|
-
|
100
|
-
|
101
|
-
|
103
|
+
if ssl
|
104
|
+
http.use_ssl = true
|
105
|
+
if @accept_self_signed_certs
|
106
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
107
|
+
end
|
102
108
|
end
|
103
109
|
|
104
110
|
request = Net::HTTP::Post.new(uri.request_uri, header)
|