fluent-plugin-dynatrace 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fluent/plugin/dynatrace_constants.rb +1 -1
- data/lib/fluent/plugin/out_dynatrace.rb +20 -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: b25942088d9fc1e97ab3e9c5ee2cfec5baca12f39744bb09012e5f5238522dd9
|
4
|
+
data.tar.gz: d942be9cfa1215746fcf513a629d09986d5996ba8a0401622b6d0cf5cdf93cf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63ca8a3ab6b1e22d7d6e4c29bdcba35e33b145b494f6e736b5cd117feb5af22e647262d0477d9eb72ab316550af2a1469cc7459f0730f3a36fceee79d4834cf0
|
7
|
+
data.tar.gz: 9c9532efc4215183ee632ea51a30c27b630b5a239b9fc548e499446fb2dd819ec6c00753e0b3756d435b8625148b59fa1e2c05ad3579d3de5b909fe1c92aa4f7
|
@@ -64,7 +64,10 @@ module Fluent
|
|
64
64
|
compat_parameters_convert(conf, :inject)
|
65
65
|
super
|
66
66
|
|
67
|
-
|
67
|
+
raise Fluent::ConfigError, 'api_token is empty' if @api_token.empty?
|
68
|
+
|
69
|
+
@uri = parse_and_validate_uri(@active_gate_url)
|
70
|
+
|
68
71
|
@agent = Net::HTTP.new(@uri.host, @uri.port)
|
69
72
|
|
70
73
|
return unless uri.scheme == 'https'
|
@@ -173,6 +176,22 @@ module Fluent
|
|
173
176
|
|
174
177
|
"failed to request #{uri} (#{res_summary})"
|
175
178
|
end
|
179
|
+
|
180
|
+
#############################################
|
181
|
+
|
182
|
+
private
|
183
|
+
|
184
|
+
def parse_and_validate_uri(uri_string)
|
185
|
+
raise Fluent::ConfigError, 'active_gate_url is empty' if uri_string.empty?
|
186
|
+
|
187
|
+
uri = URI.parse(uri_string)
|
188
|
+
raise Fluent::ConfigError, 'active_gate_url scheme must be http or https' unless
|
189
|
+
%w[http https].include?(uri.scheme)
|
190
|
+
|
191
|
+
raise Fluent::ConfigError, 'active_gate_url must include an authority' if uri.host.nil?
|
192
|
+
|
193
|
+
uri
|
194
|
+
end
|
176
195
|
end
|
177
196
|
end
|
178
197
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-dynatrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dynatrace Open Source Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|