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 +4 -4
- data/README.md +6 -11
- data/lib/fluent/plugin/in_oceanbase_logs.rb +3 -2
- data/lib/fluent/plugin/oceanbase/logs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba675afa62db755245b7619bcba7d112fa609197e17a2720d8ec08f5741b176b
|
|
4
|
+
data.tar.gz: 4d19f3d57e7370de6c0be7b4b9711c1631496ce5bd4592ea4f6340b8a8e4343d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|
-
|
|
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 "
|
|
71
|
-
tenant_id "
|
|
68
|
+
instance_id "OCEANBASE_INSTANCE_1"
|
|
69
|
+
tenant_id "OCEANBASE_TENANT_A"
|
|
72
70
|
</target>
|
|
73
71
|
<target>
|
|
74
|
-
instance_id "
|
|
75
|
-
tenant_id "
|
|
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
|
-
|
|
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."
|