Skip to content

Commit 4aa233e

Browse files
authored
Update the Oracle Integration documentation (#15839)
* Align with doc guidelines * Update changelog and manifest
1 parent 3125a17 commit 4aa233e

File tree

4 files changed

+142
-71
lines changed

4 files changed

+142
-71
lines changed

packages/oracle/_dev/build/docs/README.md

Lines changed: 68 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,67 @@
11
# Oracle Integration
22

3-
This integration is for ingesting Audit Trail logs and fetching performance, tablespace and sysmetric metrics from Oracle Databases.
3+
## Overview
44

5-
The integration expects an *.aud audit file that is generated from Oracle Databases by default. If this has been disabled then please see the [Oracle Database Audit Trail Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/introduction-to-auditing.html#GUID-8D96829C-9151-4FA4-BED9-831D088F12FF).
5+
Use the Oracle integration to ingest Oracle Database audit logs and collect database metrics for operational visibility and troubleshooting.
66

7-
### Requirements
7+
### Compatibility
88

9-
Connectivity to Oracle can be facilitated in two ways either by using official Oracle libraries or by using a JDBC driver. Facilitation of the connectivity using JDBC is not supported currently with Metricbeat. Connectivity can be facilitated using Oracle libraries and the detailed steps to do the same are mentioned below.
9+
This integration has been tested with Oracle Database 19c, and should work for 18c as well though it has not been tested.
10+
11+
## What data does this integration collect?
12+
13+
This integration collects:
14+
- Audit logs from Oracle Database audit trail files.
15+
- Metrics covering tablespace usage, system metrics, memory, system statistics, and performance.
16+
17+
:::{note}
18+
The Oracle integration expects an `*.aud` audit file that is generated from Oracle Databases by default. If disabled, refer to the [Oracle Database Audit Trail Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/introduction-to-auditing.html#GUID-8D96829C-9151-4FA4-BED9-831D088F12FF).
19+
:::
20+
21+
## What do I need to use this integration?
22+
23+
Connectivity to Oracle can be facilitated in two ways: by using official Oracle libraries, or by using a JDBC driver. Connectivity through JDBC is currently not supported with Metricbeat.
1024

11-
#### Oracle Database Connection Pre-requisites
25+
To get connected with the Oracle Database, you must set the following environment variables: `ORACLE_SID`, `ORACLE_BASE`, `ORACLE_HOME`.
1226

13-
To get connected with the Oracle Database ORACLE_SID, ORACLE_BASE, ORACLE_HOME environment variables should be set.
27+
For example, let’s consider Oracle Database 21c installation using RPM manually by following the [Oracle Installation instructions](https://docs.oracle.com/en/database/oracle/oracle-database/21/ladbi/running-rpm-packages-to-install-oracle-database.html). The environment variables should be set as follows:
28+
29+
- `ORACLE_SID=ORCLCDB`
30+
- `ORACLE_BASE=/opt/oracle/oradata`
31+
- `ORACLE_HOME=/opt/oracle/product/21c/dbhome_1`
1432

15-
For example: Let’s consider Oracle Database 21c installation using RPM manually by following the [Oracle Installation instructions](https://docs.oracle.com/en/database/oracle/oracle-database/21/ladbi/running-rpm-packages-to-install-oracle-database.html). Environment variables should be set as follows:
16-
`ORACLE_SID=ORCLCDB`
17-
`ORACLE_BASE=/opt/oracle/oradata`
18-
`ORACLE_HOME=/opt/oracle/product/21c/dbhome_1`
1933
Also, add `$ORACLE_HOME/bin` to the `PATH` environment variable.
2034

21-
#### Oracle Instant Client
35+
## How do I deploy this integration?
2236

23-
Oracle Instant Client enables development and deployment of applications that connect to Oracle Database. The Instant Client libraries provide the necessary network connectivity and advanced data features to make full use of Oracle Database. If you have OCI Oracle server which comes with these libraries pre-installed, you don't need a separate client installation.
37+
1. In Kibana, go to **Management > Integrations**.
38+
2. In the "Search for integrations" search bar, type **Oracle**.
39+
3. Click the **Oracle** integration from the search results.
40+
4. Click the **Oracle** button to add the integration.
41+
5. Configure:
42+
- Logs (audit trail): point the Elastic Agent filestream input to the Oracle audit file location (*.aud).
43+
- Metrics (SQL input): provide an Oracle DSN.
44+
6. Click **Save and Continue** to save the integration.
2445

25-
The OCI library install few Client Shared Libraries that must be referenced on the machine where Metricbeat is installed. Please follow the [Oracle Client Installation link](https://docs.oracle.com/en/database/oracle/oracle-database/21/lacli/install-instant-client-using-zip.html#GUID-D3DCB4FB-D3CA-4C25-BE48-3A1FB5A22E84) link for OCI Instant Client set up. The OCI Instant Client is available with the Oracle Universal Installer, RPM file or ZIP file. Download links can be found at the [Oracle Instant Client Download page](https://www.oracle.com/database/technologies/instant-client/downloads.html).
46+
## Oracle Instant Client
2647

27-
If Elastic Agent is running as a systemd service and not using `ldconfig` is an option, to update the links to the shared libraries, you can use the `LD_LIBRARY_PATH` environment variable instead. Follow these steps to ensure Elastic Agent and its spawned processes respect the `LD_LIBRARY_PATH` environment variable.
48+
Oracle Instant Client (OCI) enables development and deployment of applications that connect to Oracle Database. The Instant Client libraries provide the necessary network connectivity and advanced data features to make full use of Oracle Database. If you have OCI Oracle server which comes with these libraries pre-installed, you don't need a separate client installation.
2849

29-
> Prerequisites: Ensure that you have administrative privileges to modify the Elastic Agent systemd service configuration.
50+
The OCI library installs few Client Shared Libraries that must be referenced on the machine where Metricbeat is installed. To set up the OCI Instant Client, follow the [Oracle Client Installation](https://docs.oracle.com/en/database/oracle/oracle-database/21/lacli/install-instant-client-using-zip.html#GUID-D3DCB4FB-D3CA-4C25-BE48-3A1FB5A22E84) instructions. The OCI Instant Client is available with the Oracle Universal Installer, RPM file or ZIP file that you can download from the [Oracle Instant Client Download](https://www.oracle.com/database/technologies/instant-client/downloads.html) page.
51+
52+
If Elastic Agent is running as a systemd service and not using `ldconfig` is an option, to update the links to the shared libraries, you can use the `LD_LIBRARY_PATH` environment variable. Follow these steps to make sure that Elastic Agent and its spawned processes respect the `LD_LIBRARY_PATH` environment variable.
53+
54+
:::{note}
55+
Make sure that you have administrative privileges to modify the Elastic Agent systemd service configuration.
56+
:::
3057

31-
Steps:
3258
1. Check the status of the Elastic Agent systemd service by running the following command:
3359
`systemctl status elastic-agent.service`
34-
Take note of the path to the elastic-agent.service file, which is typically located in the systemd service directory. Example path: `/etc/systemd/system/elastic-agent.service`
60+
Take note of the path to the `elastic-agent.service` file, which is typically located in the systemd service directory. Example path: `/etc/systemd/system/elastic-agent.service`
3561

36-
2. Open the elastic-agent.service file in your preferred text editor, find the `EnvironmentFile` key (commonly found at `/etc/sysconfig/elastic-agent`), and verify its contents, as these configurations are essential for the elastic-agent's runtime environment initialization. If the EnvironmentFile is absent, create it and set the necessary permissions to ensure the elastic-agent has full access.
62+
2. Open the `elastic-agent.service` file in your preferred text editor, find the `EnvironmentFile` key (commonly found at `/etc/sysconfig/elastic-agent`), and verify its contents, as these configurations are essential for the elastic-agent's runtime environment initialization. If the EnvironmentFile is absent, create it and set the necessary permissions to ensure the elastic-agent has full access.
3763

38-
3. Add the LD_LIBRARY_PATH environment variable to the configured `EnvironmentFile`. You can set it to the directory where libraries (`libclntsh.so`) are located. For example, if your libraries are in the `/opt/oracle/instantclient_21_1 directory`, add the following line to the `EnvironmentFile` (i.e. `/etc/systemd/system/elastic-agent.service`)
64+
3. Add the `LD_LIBRARY_PATH` environment variable to the configured `EnvironmentFile`. Set it to the directory where libraries (`libclntsh.so`) are located. For example, if your libraries are in the `/opt/oracle/instantclient_21_1 directory`, add the following line to the `EnvironmentFile` (i.e. `/etc/systemd/system/elastic-agent.service`)
3965

4066
`LD_LIBRARY_PATH=/opt/oracle/instantclient_21_1`
4167

@@ -45,22 +71,23 @@ Steps:
4571

4672
`systemctl restart elastic-agent.service`
4773

48-
> Note: Ensure that you replace `/opt/oracle/instantclient_21_1` with the actual path to the directory where the required libraries (`libclntsh.so`) are located. This will set the library search path for the Elastic Agent service to include the specified directory, allowing it to locate the required libraries.
74+
:::{note}
75+
Make sure that you replace `/opt/oracle/instantclient_21_1` with the actual path to the directory where the required libraries (`libclntsh.so`) are located. This will set the library search path for the Elastic Agent service to include the specified directory, allowing it to locate the required libraries.
76+
:::
4977

5078
#### Enable Listener
5179

52-
The Oracle listener is a service that runs on the database host and receives requests from Oracle clients. Make sure that [Listener](https://docs.oracle.com/cd/B19306_01/network.102/b14213/lsnrctl.htm) is be running.
53-
To check if the listener is running or not, run:
80+
The Oracle listener is a service that runs on the database host and receives requests from Oracle clients. Make sure that [Listener](https://docs.oracle.com/cd/B19306_01/network.102/b14213/lsnrctl.htm) is running by using this command:
5481

5582
`lsnrctl STATUS`
5683

5784
If the listener is not running, use the command to start:
5885

5986
`lsnrctl START`
6087

61-
Then, Metricbeat can be launched.
88+
Then, you can launch Metricbeat.
6289

63-
### Oracle DSN Configuration
90+
### Configure Oracle DSN
6491

6592
The following two configuration formats are supported:
6693
```
@@ -74,25 +101,31 @@ oracle://sys:[email protected]:1521/ORCLCDB.localdomain?sysdba=1
74101
user="sys" password="Oradoc_db1" connectString="0.0.0.0:1521/ORCLCDB.localdomain" sysdba=true
75102
```
76103

77-
In the first, URL-based format, special characters should be URL encoded.
104+
In the URL-based format, special characters should be URL encoded.
78105

79-
In the seoncd, logfmt-encoded DSN format, if the password contains a backslash
106+
In the logfmt-encoded DSN format, if the password contains a backslash
80107
character (`\`), it must be escaped with another backslash. For example, if the
81108
password is `my\_password`, it must be written as `my\\_password`.
82109

83-
> Note: To mask the password shown in the DSN, remove the username and password from the DSN string, and configure the DSN to only include the host address and any additional parameters required for the connection. Subsquently, use the `username` and `password` fields under advanced options to configure them.
110+
:::{note}
111+
To mask the password shown in the DSN, remove the username and password from the DSN string, and configure the DSN to only include the host address and any additional parameters required for the connection. Subsquently, use the `username` and `password` fields under advanced options to configure them.
112+
:::
84113

85-
## Compatibility
114+
### Configure Oracle integration to connect to database using TLS Port
86115

87-
This integration has been tested with Oracle Database 19c, and should work for 18c as well though it has not been tested.
116+
To configure Oracle Integration to connect to databases using TLS ports, configure the connection string using this format:
117+
118+
```
119+
user="elastic_ro" password="" connectString="(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCPS)(HOST=0.0.0.0)(PORT=1832))) (CONNECT_DATA = (SERVICE_NAME = THESERVICENAME)))" sysdba=false
120+
```
88121

89122
### Audit Log
90123

91124
The `database_audit` dataset collects Oracle Audit logs.
92125

93126
**ECS Field Reference**
94127

95-
Please refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
128+
Refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
96129

97130
{{fields "database_audit"}}
98131

@@ -114,7 +147,7 @@ To collect the Tablespace metrics, Oracle integration relies on a specific set o
114147

115148
**ECS Field Reference**
116149

117-
Please refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
150+
Refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
118151

119152
{{fields "tablespace"}}
120153

@@ -130,7 +163,7 @@ To collect the Sysmetrics metrics, Oracle integration relies on a specific set o
130163

131164
**ECS Field Reference**
132165

133-
Please refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
166+
Refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
134167

135168
{{fields "sysmetric"}}
136169

@@ -147,7 +180,7 @@ To collect the Memory metrics, Oracle integration relies on a specific set of vi
147180

148181
**ECS Field Reference**
149182

150-
Please refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
183+
Refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
151184

152185
{{fields "memory"}}
153186

@@ -163,7 +196,7 @@ To collect the System Statistics metrics, Oracle integration relies on a specifi
163196

164197
**ECS Field Reference**
165198

166-
Please refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
199+
Refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
167200

168201
{{fields "system_statistics"}}
169202

@@ -185,7 +218,7 @@ To collect the Performance metrics, Oracle integration relies on a specific set
185218

186219
**ECS Field Reference**
187220

188-
Please refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
221+
Refer to the following [document](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) for detailed information on ECS fields.
189222

190223
{{fields "performance"}}
191224

packages/oracle/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.31.1"
3+
changes:
4+
- description: Update the Oracle Integration documentation.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/15839
27
- version: "1.31.0"
38
changes:
49
- description: Allow @custom pipeline access to event.original without setting preserve_original_event.

0 commit comments

Comments
 (0)