fluent-plugin-lm-logs 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +3 -2
- data/lib/fluent/plugin/out_lm.rb +12 -3
- data/lib/fluent/plugin/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2f2d379ca3023506ac1e1781ae37e44bdd57558894d7f9ee743c6d9d823894c
|
4
|
+
data.tar.gz: 8a88cc0984177c019f1b357ab2d72a8d8d956cb73683b48bb0e4bf0e71f4c56f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b72a7ca3c7cfdc2179244cdd82ee7f830f63c98a145b61bb5e5140d8d00dfa6ec0307d422546e5e33fc94106e32aaaa624936a02df83aef4d33b063292fba07
|
7
|
+
data.tar.gz: 2a9928406e7c5bfb460e15ef22df5b1d3f711aca6bcc171e95aa3ba663b59bae123cdd5e3a168b5a9887b4d8bb798e6188ec08181601f8a07424461a5b86e7b0
|
data/Rakefile
CHANGED
data/lib/fluent/plugin/out_lm.rb
CHANGED
@@ -83,11 +83,11 @@ module Fluent
|
|
83
83
|
|
84
84
|
def configure_auth
|
85
85
|
@use_bearer_instead_of_lmv1 = false
|
86
|
-
if @access_id
|
87
|
-
log.info "Access Id or access key null. Using bearer token for authentication."
|
86
|
+
if is_blank(@access_id) || is_blank(@access_key)
|
87
|
+
log.info "Access Id or access key blank / null. Using bearer token for authentication."
|
88
88
|
@use_bearer_instead_of_lmv1 = true
|
89
89
|
end
|
90
|
-
if @use_bearer_instead_of_lmv1 && @bearer_token
|
90
|
+
if @use_bearer_instead_of_lmv1 && is_blank(@bearer_token)
|
91
91
|
log.error "Bearer token not specified. Either access_id and access_key both or bearer_token must be specified for authentication with Logicmonitor."
|
92
92
|
raise ArgumentError, 'No valid authentication specified. Either access_id and access_key both or bearer_token must be specified for authentication with Logicmonitor.'
|
93
93
|
end
|
@@ -244,5 +244,14 @@ module Fluent
|
|
244
244
|
return "LMv1 #{@access_id}:#{signature}:#{timestamp}"
|
245
245
|
end
|
246
246
|
end
|
247
|
+
|
248
|
+
def is_blank(str)
|
249
|
+
if str.nil? || str.to_s.strip.empty?
|
250
|
+
return true
|
251
|
+
else
|
252
|
+
return false
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
247
256
|
end
|
248
257
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-lm-logs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LogicMonitor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
|
-
rubygems_version: 3.
|
83
|
+
rubygems_version: 3.5.3
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: LogicMonitor logs fluentd output plugin
|