Skip to content

Commit 0a298c2

Browse files
pipeline: outputs: oci: general cleanup
Signed-off-by: Alexa Kreizinger <[email protected]>
1 parent 466c162 commit 0a298c2

File tree

2 files changed

+41
-49
lines changed

2 files changed

+41
-49
lines changed

pipeline/outputs/oci-logging-analytics.md

Lines changed: 40 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,47 @@ description: Send logs to Oracle Cloud Infrastructure Logging Analytics Service
44

55
# Oracle Cloud Infrastructure Logging Analytics
66

7-
Oracle Cloud Infrastructure Logging Analytics output plugin allows you to ingest your log records into [OCI Logging Analytics](https://www.oracle.com/manageability/logging-analytics/) service.
7+
The _Oracle Cloud Infrastructure Logging Analytics_ output plugin lets you ingest your log records into the [Oracle Cloud Infrastructure (OCI) Logging Analytics](https://docs.oracle.com/en-us/iaas/logging-analytics/home.htm) service.
88

9-
Oracle Cloud Infrastructure Logging Analytics is a machine learning-based cloud service that monitors, aggregates, indexes, and analyzes all log data from on-premises and multicloud environments. Enabling users to search, explore, and correlate this data to troubleshoot and resolve problems faster and derive insights to make better operational decisions.
9+
## Configuration parameters
1010

11-
For details about OCI Logging Analytics refer to [the documentation](https://docs.oracle.com/en-us/iaas/logging-analytics/index.html).
11+
This plugin uses the following configuration parameters:
1212

13-
## Configuration Parameters
13+
| Key | Description | Default |
14+
| --- | ----------- | ------- |
15+
| `config_file_location` | The location of the [configuration file](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File) that contains OCI authentication details. | _none_ |
16+
| `profile_name` | The OCI configuration profile name to be used from the configuration file. | `DEFAULT` |
17+
| `namespace` | The OCI tenancy namespace to upload log data to. | _none_ |
18+
| `proxy` | The proxy name, in `http://host:port` format. Only supports HTTP protocol. | _none_ |
19+
| `workers` | The number of [workers](../administration/multithreading.md#outputs) to perform flush operations for this output. | `1` |
20+
| `oci_config_in_record` | If set to `true`, the following `oci_la_*` will be read from the record itself instead of the output plugin configuration. | `false` |
21+
| `oci_la_log_group_id` | Required. The Oracle Cloud Identifier (OCID) of the Logging Analytics where you want to store logs. | _none_ |
22+
| `oci_la_log_source_name` | Required. The Logging Analytics Source to use for processing log records. | _none_ |
23+
| `oci_la_entity_id` | The OCID of the Logging Analytics entity. | _none_ |
24+
| `oci_la_entity_type` | The entity type of the Logging Analytics entity. | _none_ |
25+
| `oci_la_log_path` | Specifies the original location of the log files. | _none_ |
26+
| `oci_la_global_metadata` | Specifies additional global metadata along with original log content to Logging Analytics. The format is `key_name value`. This option can be set multiple times. | _none_ |
27+
| `oci_la_metadata` | Specifies additional metadata for a log event along with original log content to Logging Analytics. The format is `key_name value`. This option can be set multiple times. | _none_ |
1428

15-
Following are the top level configuration properties of the plugin:
29+
### TLS/SSL
1630

17-
| Key | Description | default |
18-
|:---------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|
19-
| config_file_location | The location of the configuration file containing OCI authentication details. Reference for generating the configuration file - https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File | |
20-
| profile_name | OCI Config Profile Name to be used from the configuration file | DEFAULT |
21-
| namespace | OCI Tenancy Namespace in which the collected log data is to be uploaded | |
22-
| proxy | define proxy if required, in http://host:port format, supports only http protocol | |
23-
| workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `1` |
31+
The OCI Logging Analytics output plugin supports TLS/SSL. For more details about the properties available and general configuration, see [TLS/SSL](../../administration/transport-security.md).
2432

25-
The following parameters are to set the Logging Analytics resources that must be used to process your logs by OCI Logging Analytics.
26-
27-
| Key | Description | default |
28-
|:------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|
29-
| oci_config_in_record | If set to true, the following oci_la_* will be read from the record itself instead of the output plugin configuration. | false |
30-
| oci_la_log_group_id | The OCID of the Logging Analytics Log Group where the logs must be stored. This is a mandatory parameter | |
31-
| oci_la_log_source_name | The Logging Analytics Source that must be used to process the log records. This is a mandatory parameter | |
32-
| oci_la_entity_id | The OCID of the Logging Analytics Entity | |
33-
| oci_la_entity_type | The entity type of the Logging Analytics Entity | |
34-
| oci_la_log_path | Specify the original location of the log files | |
35-
| oci_la_global_metadata | Use this parameter to specify additional global metadata along with original log content to Logging Analytics. The format is 'key_name value'. This option can be set multiple times | |
36-
| oci_la_metadata | Use this parameter to specify additional metadata for a log event along with original log content to Logging Analytics. The format is 'key_name value'. This option can be set multiple times | |
37-
38-
## TLS/SSL
39-
40-
The OCI Logging Analytics output plugin supports TLS/SSL.
41-
For more details about the properties available and general configuration, see [TLS/SSL](../../administration/transport-security.md).
42-
43-
## Getting Started
33+
## Get started
4434

4535
### Prerequisites
4636

47-
- OCI Logging Analytics service must be onboarded with the minimum required policies, in the OCI region where you want to monitor. Refer [Logging Analytics Quick Start](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/quick-start.html) for details.
48-
- Create OCI Logging Analytics LogGroup(s) if not done already. Refer [Create Log Group](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/create-logging-analytics-resources.html#GUID-D1758CFB-861F-420D-B12F-34D1CC5E3E0E) for details.
37+
- You must onboard with the OCI Logging Analytics service for the minimum required policies in the OCI region where you want to monitor. Refer to [Logging Analytics Quick Start](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/quick-start.html) for details.
38+
39+
- You must create one or more OCI Logging Analytics log groups. Refer to [Create Log Group](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/create-logging-analytics-resources.html#GUID-D1758CFB-861F-420D-B12F-34D1CC5E3E0E) for details.
4940

50-
### Running the output plugin
41+
### Run the output plugin
5142

52-
In order to insert records into the OCI Logging Analytics service, you can run the plugin from the command line or through the configuration file:
43+
To insert records into the OCI Logging Analytics service, you can run the plugin from the command line or through a configuration file.
5344

5445
#### Command line
5546

56-
The OCI Logging Analytics plugin can read the parameters from the command line in two ways, through the -p argument (property), e.g:
47+
The OCI Logging Analytics plugin can read the parameters from the command line in two ways, through the `-p` (property) argument. For example:
5748

5849
```shell
5950
fluent-bit -i dummy -t dummy -o oci_logan -p config_file_location=<location> -p namespace=<namespace> \
@@ -92,7 +83,7 @@ pipeline:
9283
[INPUT]
9384
Name dummy
9485
Tag dummy
95-
86+
9687
[Output]
9788
Name oracle_log_analytics
9889
Match *
@@ -108,9 +99,9 @@ pipeline:
10899
{% endtab %}
109100
{% endtabs %}
110101

111-
### Insert oci_la configs in the record
102+
### Insert `oci_la` configurations in the record
112103

113-
In case of multiple inputs, where `oci_la_*` properties can differ, you can add the properties in the record itself and instruct the plugin to read these properties from the record. The option `oci_config_in_record`, when set to true in the output config, will make the plugin read the mandatory and optional `oci_la` properties from the incoming record. The user must ensure that the necessary configs have been inserted using relevant filters, otherwise the respective chunk will be dropped. Below is an example to insert `oci_la_log_source_name` and `oci_la_log_group_id` in the record:
104+
In case of multiple inputs, where `oci_la_*` properties can differ, you can add the properties in the record itself and instruct the plugin to read these properties from the record. The option `oci_config_in_record`, when set to `true` in the output config, will make the plugin read the mandatory and optional `oci_la` properties from the incoming record. The user must ensure that the necessary configurations have been inserted using relevant filters, otherwise the respective chunk will be dropped. The following example inserts `oci_la_log_source_name` and `oci_la_log_group_id` in the record:
114105

115106
{% tabs %}
116107
{% tab title="fluent-bit.yaml" %}
@@ -127,7 +118,7 @@ pipeline:
127118
add:
128119
- oci_la_log_source_name <LOG_SOURCE_NAME>
129120
- oci_la_log_group_id <LOG_GROUP_OCID>
130-
121+
131122
outputs:
132123
- name: oracle_log_analytics
133124
match: '*'
@@ -186,10 +177,10 @@ pipeline:
186177
profile_name: ADMIN
187178
oci_la_log_source_name: example_log_source
188179
oci_la_log_group_id: ocid.xxxxxx
189-
oci_la_global_metadata:
180+
oci_la_global_metadata:
190181
- glob_key1 value1
191182
- glob_key2 value2
192-
oci_la_metadata:
183+
oci_la_metadata:
193184
- key1 value1
194185
- key2 value2
195186
tls: on
@@ -203,7 +194,7 @@ pipeline:
203194
[INPUT]
204195
Name dummy
205196
Tag dummy
206-
197+
207198
[Output]
208199
Name oracle_log_analytics
209200
Match *
@@ -223,7 +214,7 @@ pipeline:
223214
{% endtab %}
224215
{% endtabs %}
225216

226-
The above configuration will generate a payload that looks like this
217+
The previous configuration will generate a payload that resembles the following:
227218

228219
```json
229220
{
@@ -248,7 +239,7 @@ The above configuration will generate a payload that looks like this
248239

249240
The multiple `oci_la_global_metadata` and `oci_la_metadata` options are turned into a JSON object of key value pairs, nested under the key metadata.
250241

251-
With `oci_config_in_record` option set to true, the metadata key-value pairs will need to be injected in the record as an object of key value pair nested under the respective metadata field. Below is an example of one such configuration
242+
With `oci_config_in_record` option set to `true`, the metadata key/value pairs will need to be injected in the record as an object of key/value pairs nested under the respective metadata field. The following example shows one such configuration:
252243

253244
{% tabs %}
254245
{% tab title="fluent-bit.yaml" %}
@@ -265,7 +256,7 @@ pipeline:
265256
add:
266257
- olgm.key1 val1
267258
- olgm.key2 val2
268-
259+
269260
- name: nest
270261
match: '*'
271262
operation: olgm.*
@@ -278,7 +269,7 @@ pipeline:
278269
add:
279270
- oci_la_log_source_name <LOG_SOURCE_NAME>
280271
- oci_la_log_group_id <LOG_GROUP_OCID>
281-
272+
282273
outputs:
283274
- name: oracle_log_analytics
284275
match: '*'
@@ -326,10 +317,10 @@ pipeline:
326317
profile_name ADMIN
327318
oci_config_in_record true
328319
tls On
329-
tls.verify Off
320+
tls.verify Off
330321
```
331322

332323
{% endtab %}
333324
{% endtabs %}
334325

335-
The above configuration first injects the necessary metadata keys and values in the record directly, with a prefix olgm. attached to the keys in order to segregate the metadata keys from rest of the record keys. Then, using a nest filter only the metadata keys are selected by the filter and nested under `oci_la_global_metadata` key in the record, and the prefix `olgm`. is removed from the metadata keys.
326+
The previous configuration first injects the necessary metadata keys and values in the record directly, with a prefix `olgm.` attached to the keys, which segregates the metadata keys from rest of the record keys. Then, using a `nest` filter only the metadata keys are selected by the filter and nested under `oci_la_global_metadata` key in the record, and the prefix `olgm.` is removed from the metadata keys.

vale-styles/FluentBit/Headings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ exceptions:
8484
- OpenObserve
8585
- OpenTelemetry
8686
- Opsgenie
87+
- Oracle Cloud Infrastructure Logging Analytics
8788
- PagerDuty
8889
- PostgreSQL
8990
- Prometheus

0 commit comments

Comments
 (0)