fluent-plugin-oci-logging 1.0.2 → 1.0.5
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/lib/fluent/plugin/logging_setup.rb +4 -0
- data/lib/fluent/plugin/os.rb +22 -0
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 55daadb06cc22cae55a16a6be2762e40fcd71e237b15ffa9e26cc58124e116f9
|
|
4
|
+
data.tar.gz: 2c24aaa6537aab53d7ed4dc6c968d67331e4424f1fc6a11c6ebc003d81694ab6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 363ef60bba7cf8501dd0b582c29460c5f03d84b51640ec2b198a453f468ba4c4f2fd895c7072a69c59fa3e31bda300e97a84152247f5fb928b4b8fc89dcb4ed7
|
|
7
|
+
data.tar.gz: e002ac4789e72e53076ffb7c1e9a3157d67e24c886e909acf930d7ab4a20bb071b8f5c07354b288453af57cadbe628dc03d89c6e68a0427dc715a1d82e305715
|
|
@@ -27,6 +27,7 @@ module Fluent
|
|
|
27
27
|
PUBLIC_DEFAULT_LINUX_CA_PATH = '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem'
|
|
28
28
|
PUBLIC_DEFAULT_WINDOWS_CA_PATH = 'C:\\oracle_unified_agent\\unified-monitoring-agent\\embedded\\ssl\\certs\\cacert.pem'
|
|
29
29
|
PUBLIC_DEFAULT_UBUNTU_CA_PATH = '/etc/ssl/certs/ca-certificates.crt'
|
|
30
|
+
PUBLIC_DEFAULT_DEBIAN_CA_PATH = PUBLIC_DEFAULT_UBUNTU_CA_PATH
|
|
30
31
|
|
|
31
32
|
def logger
|
|
32
33
|
@log ||= OS.windows? ? Logger.new(WINDOWS_UPLOADER_OUTPUT_LOG) : Logger.new($stdout)
|
|
@@ -219,10 +220,13 @@ module Fluent
|
|
|
219
220
|
# Since r1 overlay has a different default make sure to update this
|
|
220
221
|
#
|
|
221
222
|
def set_default_ca_file
|
|
223
|
+
@ca_file = PUBLIC_DEFAULT_LINUX_CA_PATH if @ca_file.nil?
|
|
222
224
|
if OS.windows?
|
|
223
225
|
@ca_file = @ca_file == PUBLIC_DEFAULT_LINUX_CA_PATH ? PUBLIC_DEFAULT_WINDOWS_CA_PATH : @ca_file
|
|
224
226
|
elsif OS.ubuntu?
|
|
225
227
|
@ca_file = @ca_file == PUBLIC_DEFAULT_LINUX_CA_PATH ? PUBLIC_DEFAULT_UBUNTU_CA_PATH : @ca_file
|
|
228
|
+
elsif OS.debian?
|
|
229
|
+
@ca_file = @ca_file == PUBLIC_DEFAULT_LINUX_CA_PATH ? PUBLIC_DEFAULT_DEBIAN_CA_PATH : @ca_file
|
|
226
230
|
else
|
|
227
231
|
@ca_file = @region == 'r1' && @ca_file == PUBLIC_DEFAULT_LINUX_CA_PATH ? R1_CA_PATH : @ca_file
|
|
228
232
|
end
|
data/lib/fluent/plugin/os.rb
CHANGED
|
@@ -27,6 +27,10 @@ module OS
|
|
|
27
27
|
linux? and os_name_ubuntu?
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
def self.debian?
|
|
31
|
+
linux? and os_name_debian?
|
|
32
|
+
end
|
|
33
|
+
|
|
30
34
|
def self.os_name_ubuntu?
|
|
31
35
|
os_name = 'not_found'
|
|
32
36
|
file_name = '/etc/os-release'
|
|
@@ -45,4 +49,22 @@ module OS
|
|
|
45
49
|
false
|
|
46
50
|
end
|
|
47
51
|
|
|
52
|
+
def self.os_name_debian?
|
|
53
|
+
os_name = 'not_found'
|
|
54
|
+
file_name = '/etc/os-release'
|
|
55
|
+
if File.exists?(file_name)
|
|
56
|
+
File.foreach(file_name).each do |line|
|
|
57
|
+
if line.start_with?('ID=')
|
|
58
|
+
os_name = line.split('=')[1].strip
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
else
|
|
62
|
+
logger.info('Unknown linux distribution detected')
|
|
63
|
+
end
|
|
64
|
+
os_name == 'debian' ? true : false
|
|
65
|
+
rescue StandardError => e
|
|
66
|
+
log.error "Unable to detect ubuntu platform due to: #{e.message}"
|
|
67
|
+
false
|
|
68
|
+
end
|
|
69
|
+
|
|
48
70
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-oci-logging
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OCI Observability Team
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-05-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fluentd
|
|
@@ -171,7 +171,7 @@ licenses:
|
|
|
171
171
|
- Apache-2.0
|
|
172
172
|
metadata:
|
|
173
173
|
source_code_uri: https://github.com/oracle/fluent-plugin-oci-logging
|
|
174
|
-
post_install_message:
|
|
174
|
+
post_install_message:
|
|
175
175
|
rdoc_options: []
|
|
176
176
|
require_paths:
|
|
177
177
|
- lib
|
|
@@ -186,8 +186,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
187
|
version: '0'
|
|
188
188
|
requirements: []
|
|
189
|
-
rubygems_version: 3.2
|
|
190
|
-
signing_key:
|
|
189
|
+
rubygems_version: 3.1.2
|
|
190
|
+
signing_key:
|
|
191
191
|
specification_version: 4
|
|
192
192
|
summary: OCI Fluentd Logging output plugin following Unified Schema
|
|
193
193
|
test_files: []
|