fluent-plugin-oci-logging-analytics 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5a472e64d8b068a1d4ae4d9c8007c0cfcfae37290ec188ff6a1e7a97f9b3005
|
4
|
+
data.tar.gz: be3762be1e1e6794672bc9ff21871a96d6a5a82053743c6432bab4ca209e0d22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed1e0a0ee7201c4ad6a2b0cb632fddf155778569ff47762d12407f1bf76c431d8cffb32bdb391f84b484eaf4698d1b457c2ddfcfa4e46b61a02ff550d4c3a650
|
7
|
+
data.tar.gz: 685a2f9fe44d8fbe8b49c64880a2f2bafe065242e1a2700b8ac3e40cb14b66ff0aa3b3a3975a9da7d62bbec203f3fb59700f950a33fbee78ab1e1e45dc1738f6
|
data/lib/fluent/dto/logEvents.rb
CHANGED
File without changes
|
@@ -92,6 +92,8 @@ module Fluent::Plugin
|
|
92
92
|
config_param :endpoint, :string, :default => nil
|
93
93
|
desc 'AuthType to be used.'
|
94
94
|
config_param :auth_type, :string, :default => 'InstancePrincipal'
|
95
|
+
desc 'OCI Domain'
|
96
|
+
config_param :oci_domain, :string, :default => nil
|
95
97
|
desc 'Enable local payload dump.'
|
96
98
|
config_param :dump_zip_file, :bool, :default => false
|
97
99
|
desc 'Payload zip File Location.'
|
@@ -249,34 +251,62 @@ module Fluent::Plugin
|
|
249
251
|
if is_valid(@config_file_location)
|
250
252
|
@auth_type = "ConfigFile"
|
251
253
|
end
|
254
|
+
|
252
255
|
case @auth_type
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
when "WorkloadIdentity"
|
262
|
-
workload_identity_signer = OCI::Auth::Signers::oke_workload_resource_principal_signer
|
263
|
-
if is_valid(@endpoint)
|
264
|
-
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: OCI::Config.new, endpoint: @endpoint, signer: workload_identity_signer)
|
265
|
-
@@logger.info {"loganalytics_client initialised with endpoint: #{@endpoint}"}
|
266
|
-
else
|
267
|
-
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: OCI::Config.new, signer: workload_identity_signer)
|
268
|
-
end
|
269
|
-
when "ConfigFile"
|
270
|
-
my_config = OCI::ConfigFileLoader.load_config(config_file_location: @config_file_location, profile_name: @profile_name)
|
271
|
-
if is_valid(@endpoint)
|
272
|
-
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: my_config, endpoint: @endpoint)
|
273
|
-
@@logger.info {"loganalytics_client initialised with endpoint: #{@endpoint}"}
|
274
|
-
else
|
275
|
-
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config:my_config)
|
276
|
-
end
|
256
|
+
when "InstancePrincipal"
|
257
|
+
instance_principals_signer = nil
|
258
|
+
la_endpoint = nil
|
259
|
+
if is_valid(@oci_domain)
|
260
|
+
fedration_endpoint = "https://auth.#{@oci_domain}/v1/x509"
|
261
|
+
instance_principals_signer = OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new(
|
262
|
+
federation_endpoint: fedration_endpoint)
|
263
|
+
@@logger.info "Custom Federation Endpoint: #{fedration_endpoint}"
|
277
264
|
else
|
278
|
-
|
279
|
-
|
265
|
+
instance_principals_signer = OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new
|
266
|
+
end
|
267
|
+
if is_valid(@endpoint)
|
268
|
+
la_endpoint = @endpoint
|
269
|
+
@@logger.info "Initializing loganalytics_client with endpoint: #{la_endpoint}"
|
270
|
+
elsif is_valid(@oci_domain)
|
271
|
+
la_endpoint = "https://loganalytics.#{@oci_domain}"
|
272
|
+
@@logger.info "Initializing loganalytics_client with custom domain endpoint: #{la_endpoint}"
|
273
|
+
end
|
274
|
+
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(
|
275
|
+
config: OCI::Config.new,
|
276
|
+
endpoint: la_endpoint,
|
277
|
+
signer: instance_principals_signer)
|
278
|
+
@@logger.info 'loganalytics_client initialized.'
|
279
|
+
when "WorkloadIdentity"
|
280
|
+
la_endpoint = nil
|
281
|
+
workload_identity_signer = OCI::Auth::Signers::oke_workload_resource_principal_signer
|
282
|
+
if is_valid(@endpoint)
|
283
|
+
la_endpoint = @endpoint
|
284
|
+
@@logger.info "Initializing loganalytics_client with endpoint: #{@endpoint}"
|
285
|
+
elsif is_valid(@oci_domain)
|
286
|
+
la_endpoint = "https://loganalytics.#{@oci_domain}"
|
287
|
+
@@logger.info "Initializing loganalytics_client with custom domain endpoint: #{la_endpoint}"
|
288
|
+
end
|
289
|
+
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(
|
290
|
+
config: OCI::Config.new,
|
291
|
+
endpoint: la_endpoint,
|
292
|
+
signer: workload_identity_signer)
|
293
|
+
@@logger.info 'loganalytics_client initialized.'
|
294
|
+
when "ConfigFile"
|
295
|
+
my_config = OCI::ConfigFileLoader.load_config(
|
296
|
+
config_file_location: @config_file_location,
|
297
|
+
profile_name: @profile_name)
|
298
|
+
la_endpoint = nil
|
299
|
+
if is_valid(@endpoint)
|
300
|
+
la_endpoint = @endpoint
|
301
|
+
@@logger.info "Initializing loganalytics_client with endpoint: #{la_endpoint}"
|
302
|
+
elsif is_valid(@oci_domain)
|
303
|
+
la_endpoint = "https://loganalytics.#{@oci_domain}"
|
304
|
+
@@logger.info "Initializing loganalytics_client with custom domain endpoint: #{la_endpoint}"
|
305
|
+
end
|
306
|
+
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: my_config, endpoint: la_endpoint)
|
307
|
+
@@logger.info 'loganalytics_client initialised'
|
308
|
+
else
|
309
|
+
raise Fluent::ConfigError, "Invalid authType: #{@auth_type}, valid inputs are - InstancePrincipal, ConfigFile, WorkloadIdentity"
|
280
310
|
end
|
281
311
|
|
282
312
|
if is_valid(@proxy_ip) && is_number(@proxy_port)
|
@@ -288,13 +318,18 @@ module Fluent::Plugin
|
|
288
318
|
end
|
289
319
|
|
290
320
|
rescue => ex
|
291
|
-
|
292
|
-
|
293
|
-
|
321
|
+
@@logger.error {"Error occurred while initializing LogAnalytics Client:
|
322
|
+
authType: #{@auth_type},
|
323
|
+
errorMessage: #{ex}"}
|
294
324
|
end
|
295
325
|
|
296
326
|
def configure(conf)
|
297
327
|
super
|
328
|
+
|
329
|
+
if is_valid(@oci_domain) && !@oci_domain.match(/\S.oci.\S/)
|
330
|
+
raise Fluent::ConfigError, "Invalid oci_domain: #{@oci_domain}, valid fmt: <oci-region>.oci.<oci-domain> | ex: us-ashburn-1.oci.oraclecloud.com"
|
331
|
+
end
|
332
|
+
|
298
333
|
@@prometheusMetrics = PrometheusMetrics.instance
|
299
334
|
initialize_logger
|
300
335
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
## Copyright (c) 2024 Oracle and/or its affiliates.
|
1
|
+
## Copyright (c) 2021, 2024 Oracle and/or its affiliates.
|
2
2
|
## The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
|
3
3
|
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
6
|
module Version
|
7
|
-
VERSION = "2.0.
|
7
|
+
VERSION = "2.0.8".freeze
|
8
8
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-oci-logging-analytics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oracle
|
8
8
|
- 'OCI Observability: Logging Analytics'
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-11-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -136,14 +136,14 @@ files:
|
|
136
136
|
- lib/fluent/metrics/prometheusMetrics.rb
|
137
137
|
- lib/fluent/plugin/out_oci-logging-analytics.rb
|
138
138
|
- lib/fluent/version/version.rb
|
139
|
-
homepage:
|
139
|
+
homepage:
|
140
140
|
licenses:
|
141
141
|
- UPL-1.0
|
142
142
|
metadata:
|
143
143
|
documentation_uri: https://docs.oracle.com/en/learn/oci_logging_analytics_fluentd/
|
144
144
|
source_code_uri: https://github.com/oracle-quickstart/oci-logan-fluentd-output-plugin
|
145
145
|
changelog_uri: https://github.com/oracle-quickstart/oci-logan-fluentd-output-plugin/blob/main/CHANGELOG.md
|
146
|
-
post_install_message:
|
146
|
+
post_install_message:
|
147
147
|
rdoc_options: []
|
148
148
|
require_paths:
|
149
149
|
- lib
|
@@ -158,8 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.
|
162
|
-
signing_key:
|
161
|
+
rubygems_version: 3.3.27
|
162
|
+
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Fluentd output plugin for OCI Logging Analytics.
|
165
165
|
test_files: []
|