You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/oracle/_dev/build/docs/README.md
+68-35Lines changed: 68 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,41 +1,67 @@
1
1
# Oracle Integration
2
2
3
-
This integration is for ingesting Audit Trail logs and fetching performance, tablespace and sysmetric metrics from Oracle Databases.
3
+
## Overview
4
4
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.
6
6
7
-
### Requirements
7
+
### Compatibility
8
8
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.
10
24
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`.
12
26
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`
14
32
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`
19
33
Also, add `$ORACLE_HOME/bin` to the `PATH` environment variable.
20
34
21
-
#### Oracle Instant Client
35
+
##How do I deploy this integration?
22
36
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.
24
45
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
26
47
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.
28
49
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
+
:::
30
57
31
-
Steps:
32
58
1. Check the status of the Elastic Agent systemd service by running the following command:
33
59
`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`
35
61
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.
37
63
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`)
39
65
40
66
`LD_LIBRARY_PATH=/opt/oracle/instantclient_21_1`
41
67
@@ -45,22 +71,23 @@ Steps:
45
71
46
72
`systemctl restart elastic-agent.service`
47
73
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
+
:::
49
77
50
78
#### Enable Listener
51
79
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:
54
81
55
82
`lsnrctl STATUS`
56
83
57
84
If the listener is not running, use the command to start:
58
85
59
86
`lsnrctl START`
60
87
61
-
Then, Metricbeat can be launched.
88
+
Then, you can launch Metricbeat.
62
89
63
-
### Oracle DSN Configuration
90
+
### Configure Oracle DSN
64
91
65
92
The following two configuration formats are supported:
In the first, URL-based format, special characters should be URL encoded.
104
+
In the URL-based format, special characters should be URL encoded.
78
105
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
80
107
character (`\`), it must be escaped with another backslash. For example, if the
81
108
password is `my\_password`, it must be written as `my\\_password`.
82
109
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
+
:::
84
113
85
-
##Compatibility
114
+
### Configure Oracle integration to connect to database using TLS Port
86
115
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:
0 commit comments