fluent-plugin-oceanbase-logs 0.1.4 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b21a8c2fad6676c5f9b5b8f00cd849091b8c4077c745b2fa7a462995f9b7b07
4
- data.tar.gz: 0f1a70d45968dc28815fb3c507e85b7115cc6b3682f0a5a762a0bdc5467f9019
3
+ metadata.gz: ba675afa62db755245b7619bcba7d112fa609197e17a2720d8ec08f5741b176b
4
+ data.tar.gz: 4d19f3d57e7370de6c0be7b4b9711c1631496ce5bd4592ea4f6340b8a8e4343d
5
5
  SHA512:
6
- metadata.gz: 02b0aaf81f118afdcc215f377f7c13ca2ca63d2a1cd28008f778b902e9277b614f28464973fbec4d5ce4a7550fbc3eca9a9f43833367379f58a7f967398f1a05
7
- data.tar.gz: 2dfdd6d0bbe2ac20532ef99e1ef1e764d7d8fa9244043865370e9b1c77378766503ae19680f50266085e39a0ad8af0784ee00eeb19f904e4ee6523de902692f8
6
+ metadata.gz: '07788a07945ed06c2bff1ef4c3519b88bcd9baf9f7ad9227b8ff922c767726da664ed95bc3b3e43290d56c6a5fd3fae64b30faf77b4eeed666927c76fa6c1c74'
7
+ data.tar.gz: e6db9efc176ec88627f9aaf030e598fae9a487c6f09ff82a8fe0d75cbddb1330811e8553ba71f23c1572e3867fe3eb5d5227f76ff1612c5e468107dbebf08662
data/README.md CHANGED
@@ -13,7 +13,7 @@ Every record includes **`ob_log_type`** (`slow_sql` or `top_sql`). With `include
13
13
 
14
14
  | Gem | Fluentd | Ruby |
15
15
  | --- | --- | --- |
16
- | >= 0.1.2 | >= 1.8.0 | >= 2.4 |
16
+ | >= 0.1.5 | >= 1.8.0 | >= 2.4 |
17
17
 
18
18
  For **Grafana Loki** output you additionally need [fluent-plugin-grafana-loki](https://github.com/grafana/fluent-plugin-grafana-loki).
19
19
 
@@ -59,21 +59,18 @@ Example: two clusters, one tenant each, and a second scope that filters one data
59
59
  log_type slow_sql
60
60
  access_key_id "#{ENV['OCEANBASE_ACCESS_KEY_ID']}"
61
61
  access_key_secret "#{ENV['OCEANBASE_ACCESS_KEY_SECRET']}"
62
- instance_id ""
63
- tenant_id ""
64
- endpoint api-cloud-cn.oceanbase.com
62
+ endpoint "#{ENV['OCEANBASE_ACCESS_KEY_SECRET']}"
65
63
  fetch_interval 60
66
64
  lookback_seconds 600
67
65
  deduplicate true
68
66
  include_metadata true
69
67
  <target>
70
- instance_id "#{ENV['OCEANBASE_INSTANCE_1']}"
71
- tenant_id "#{ENV['OCEANBASE_TENANT_A']}"
68
+ instance_id "OCEANBASE_INSTANCE_1"
69
+ tenant_id "OCEANBASE_TENANT_A"
72
70
  </target>
73
71
  <target>
74
- instance_id "#{ENV['OCEANBASE_INSTANCE_2']}"
75
- tenant_id "#{ENV['OCEANBASE_TENANT_B']}"
76
- db_name "#{ENV['OCEANBASE_DB_ANALYTICS']}"
72
+ instance_id "OCEANBASE_INSTANCE_2"
73
+ tenant_id "OCEANBASE_TENANT_B"
77
74
  </target>
78
75
  <storage>
79
76
  @type local
@@ -83,8 +80,6 @@ Example: two clusters, one tenant each, and a second scope that filters one data
83
80
  </source>
84
81
  ```
85
82
 
86
- The same tenant with multiple databases needs one `<target>` per database (or a target without `db_name` to pull all DBs for that tenant, if your API usage allows omitting `dbName`).
87
-
88
83
  ### Example: Slow SQL → JSON file
89
84
 
90
85
  Full sample: [`example/fluentd.conf`](example/fluentd.conf).
@@ -36,9 +36,10 @@ module Fluent::Plugin
36
36
  desc: "OceanBase tenant ID (legacy single scope; ignored when <target> sections are present)."
37
37
 
38
38
  config_section :target, param_name: :targets, multi: true, required: false do
39
- config_param :instance_id, :string,
39
+ # Defaults allow Fluentd to parse <target> blocks; build_fetch_scopes validates non-empty.
40
+ config_param :instance_id, :string, default: '',
40
41
  desc: "Instance ID for this scope."
41
- config_param :tenant_id, :string,
42
+ config_param :tenant_id, :string, default: '',
42
43
  desc: "Tenant ID for this scope."
43
44
  config_param :db_name, :string, default: nil,
44
45
  desc: "Optional database name filter for this scope."
@@ -2,7 +2,7 @@ module Fluent
2
2
  module Plugin
3
3
  module OceanBase
4
4
  module Logs
5
- VERSION = "0.1.4"
5
+ VERSION = "0.1.5"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-oceanbase-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - OceanBase Integrations