fluent-plugin-oci-logging-analytics 2.0.8 → 2.1.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd5776c0bd11f46ba2366daaef22deeae726369f8f96071de570bb49ae6518bc
|
|
4
|
+
data.tar.gz: cd579f95bb5ca0fb80eaac9545f2b4658fed580dff45e3d6d7daa7fdb004eb94
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3faf9d1372e1da861d7b3f5e32dc82b401379ffece838003cf5862ea380c52d6ed3d13b053470dc11bdbba18382fed71699188a832bf002635854c9f7ef47297
|
|
7
|
+
data.tar.gz: ba6c3e00de0cdf9843fc965249a1db4896b5a36632b5b6fa4a998f191ecd8247e9690aff5cde5379cb532418e94370ae8c4146f57c395d7435839b7f774cd28f
|
|
@@ -17,15 +17,15 @@ class PrometheusMetrics
|
|
|
17
17
|
end
|
|
18
18
|
def createMetrics
|
|
19
19
|
gauge = Prometheus::Client::Gauge
|
|
20
|
-
@records_received = gauge.new(:oci_la_fluentd_output_plugin_records_received, docstring: 'Number of records received by the OCI
|
|
21
|
-
@records_valid = gauge.new(:oci_la_fluentd_output_plugin_records_valid, docstring: 'Number of valid records received by the OCI
|
|
22
|
-
@records_invalid = gauge.new(:oci_la_fluentd_output_plugin_records_invalid, docstring: 'Number of invalid records received by the OCI
|
|
23
|
-
@records_error = gauge.new(:oci_la_fluentd_output_plugin_records_post_error, docstring: 'Number of records failed posting to OCI
|
|
24
|
-
@records_posted = gauge.new(:oci_la_fluentd_output_plugin_records_post_success, docstring: 'Number of records posted by the OCI
|
|
20
|
+
@records_received = gauge.new(:oci_la_fluentd_output_plugin_records_received, docstring: 'Number of records received by the OCI Log Analytics Fluentd output plugin.', labels: [:worker_id,:tag,:oci_la_log_group_id,:oci_la_log_source_name,:oci_la_log_set])
|
|
21
|
+
@records_valid = gauge.new(:oci_la_fluentd_output_plugin_records_valid, docstring: 'Number of valid records received by the OCI Log Analytics Fluentd output plugin.', labels: [:worker_id,:tag,:oci_la_log_group_id,:oci_la_log_source_name,:oci_la_log_set])
|
|
22
|
+
@records_invalid = gauge.new(:oci_la_fluentd_output_plugin_records_invalid, docstring: 'Number of invalid records received by the OCI Log Analytics Fluentd output plugin.', labels: [:worker_id,:tag,:oci_la_log_group_id,:oci_la_log_source_name,:oci_la_log_set,:reason])
|
|
23
|
+
@records_error = gauge.new(:oci_la_fluentd_output_plugin_records_post_error, docstring: 'Number of records failed posting to OCI Log Analytics by the Fluentd output plugin.', labels: [:worker_id,:tag,:oci_la_log_group_id,:oci_la_log_source_name,:oci_la_log_set,:error_code, :reason])
|
|
24
|
+
@records_posted = gauge.new(:oci_la_fluentd_output_plugin_records_post_success, docstring: 'Number of records posted by the OCI Log Analytics Fluentd output plugin.', labels: [:worker_id,:tag,:oci_la_log_group_id,:oci_la_log_source_name,:oci_la_log_set])
|
|
25
25
|
|
|
26
26
|
histogram = Prometheus::Client::Histogram
|
|
27
|
-
@chunk_time_to_receive = histogram.new(:oci_la_fluentd_output_plugin_chunk_time_to_receive, docstring: 'Average time taken by Fluentd to deliver the collected records from Input plugin to OCI
|
|
28
|
-
@chunk_time_to_upload = histogram.new(:oci_la_fluentd_output_plugin_chunk_time_to_post, docstring: 'Average time taken for posting the received records to OCI
|
|
27
|
+
@chunk_time_to_receive = histogram.new(:oci_la_fluentd_output_plugin_chunk_time_to_receive, docstring: 'Average time taken by Fluentd to deliver the collected records from Input plugin to OCI Log Analytics output plugin.', labels: [:worker_id,:tag])
|
|
28
|
+
@chunk_time_to_upload = histogram.new(:oci_la_fluentd_output_plugin_chunk_time_to_post, docstring: 'Average time taken for posting the received records to OCI Log Analytics by the Fluentd output plugin.', labels: [:worker_id,:oci_la_log_group_id])
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def registerMetrics
|
|
@@ -243,7 +243,7 @@ module Fluent::Plugin
|
|
|
243
243
|
rescue => ex
|
|
244
244
|
@@logger = log
|
|
245
245
|
@@logger.error {"Error while initializing logger:#{ex.inspect}"}
|
|
246
|
-
@@logger.info {"Redirecting oci
|
|
246
|
+
@@logger.info {"Redirecting oci log analytics logs to STDOUT"}
|
|
247
247
|
end
|
|
248
248
|
end
|
|
249
249
|
|
|
@@ -277,20 +277,49 @@ module Fluent::Plugin
|
|
|
277
277
|
signer: instance_principals_signer)
|
|
278
278
|
@@logger.info 'loganalytics_client initialized.'
|
|
279
279
|
when "WorkloadIdentity"
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
workload_identity_signer = OCI::Auth::Signers.oke_workload_resource_principal_signer
|
|
281
|
+
region = nil
|
|
282
|
+
config = OCI::Config.new
|
|
283
|
+
|
|
284
|
+
if is_valid(@oci_domain)
|
|
285
|
+
region_match = @oci_domain.match(/^([^.]+)\.oci\./)
|
|
286
|
+
region = region_match[1]
|
|
287
|
+
@@logger.info "Extracted region from oci_domain: #{region}"
|
|
288
|
+
else
|
|
289
|
+
begin
|
|
290
|
+
tmp_signer = OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new
|
|
291
|
+
if tmp_signer.region
|
|
292
|
+
region = tmp_signer.region
|
|
293
|
+
@@logger.info "Extracted region from IMDS: #{region}"
|
|
294
|
+
else
|
|
295
|
+
raise Fluent::ConfigError, "IMDS returned nil region. " \
|
|
296
|
+
"Please provide 'oci_domain' parameter (e.g., us-ashburn-1.oci.oraclecloud.com)."
|
|
297
|
+
end
|
|
298
|
+
rescue Fluent::ConfigError
|
|
299
|
+
raise
|
|
300
|
+
rescue => e
|
|
301
|
+
raise Fluent::ConfigError, "Unable to determine region. " \
|
|
302
|
+
"IMDS not available: #{e.message}. " \
|
|
303
|
+
"Please provide 'oci_domain' parameter (e.g., us-ashburn-1.oci.oraclecloud.com)."
|
|
304
|
+
end
|
|
305
|
+
end
|
|
282
306
|
if is_valid(@endpoint)
|
|
283
307
|
la_endpoint = @endpoint
|
|
284
|
-
@@logger.info "
|
|
308
|
+
@@logger.info "Using custom endpoint"
|
|
285
309
|
elsif is_valid(@oci_domain)
|
|
286
310
|
la_endpoint = "https://loganalytics.#{@oci_domain}"
|
|
287
|
-
@@logger.info "
|
|
311
|
+
@@logger.info "Using oci_domain endpoint"
|
|
312
|
+
else
|
|
313
|
+
la_endpoint = nil
|
|
314
|
+
@@logger.info "Using SDK default endpoint"
|
|
288
315
|
end
|
|
316
|
+
config.region = region
|
|
317
|
+
|
|
289
318
|
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(
|
|
290
|
-
config:
|
|
319
|
+
config: config,
|
|
291
320
|
endpoint: la_endpoint,
|
|
292
321
|
signer: workload_identity_signer)
|
|
293
|
-
@@logger.info 'loganalytics_client initialized.'
|
|
322
|
+
@@logger.info 'loganalytics_client initialized with WorkloadIdentity.'
|
|
294
323
|
when "ConfigFile"
|
|
295
324
|
my_config = OCI::ConfigFileLoader.load_config(
|
|
296
325
|
config_file_location: @config_file_location,
|
|
@@ -326,8 +355,9 @@ module Fluent::Plugin
|
|
|
326
355
|
def configure(conf)
|
|
327
356
|
super
|
|
328
357
|
|
|
329
|
-
if is_valid(@oci_domain) && !@oci_domain.match(
|
|
330
|
-
raise Fluent::ConfigError,
|
|
358
|
+
if is_valid(@oci_domain) && !@oci_domain.match(/^[a-z0-9-]+\.oci\.[a-z0-9.]+[a-z0-9]$/i)
|
|
359
|
+
raise Fluent::ConfigError, "Invalid oci_domain: #{@oci_domain}, " \
|
|
360
|
+
"valid format: <region>.oci.<domain> (e.g., us-ashburn-1.oci.oraclecloud.com)"
|
|
331
361
|
end
|
|
332
362
|
|
|
333
363
|
@@prometheusMetrics = PrometheusMetrics.instance
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oracle
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-10-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -121,8 +121,8 @@ dependencies:
|
|
|
121
121
|
- - ">="
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
123
|
version: 1.4.3
|
|
124
|
-
description:
|
|
125
|
-
|
|
124
|
+
description: Fluentd output plugin for ingesting the collected log events to OCI Log
|
|
125
|
+
Analytics (previously known as OCI Logging Analytics).
|
|
126
126
|
email:
|
|
127
127
|
- oci_la_plugins_grp@oracle.com
|
|
128
128
|
executables: []
|
|
@@ -161,5 +161,5 @@ requirements: []
|
|
|
161
161
|
rubygems_version: 3.3.27
|
|
162
162
|
signing_key:
|
|
163
163
|
specification_version: 4
|
|
164
|
-
summary: Fluentd output plugin for OCI
|
|
164
|
+
summary: Fluentd output plugin for OCI Log Analytics.
|
|
165
165
|
test_files: []
|