This is the Oracle module for Metricbeat. It is under active development with feedback from the community. A single Metricset for Tablespace monitoring is added so the community can start gathering metrics from their nodes and contributing to the module.
Oracle Metricbeat module is being tested version 12c R2 by using the store/oracle/database-enterprise:18.104.22.168 Docker image downloaded directly from the Oracle Docker Hub repository which is based on 5.0.13-arch1-1-ARCH Arch Linux. This is important, the module has only been tested with the mentioned image in Linux environments.
An overview dashboard for Kibana is already included:
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.
Oracle Database Connection Pre-requisites
To get connected with the Oracle Database ORACLE_SID, ORACLE_BASE, ORACLE_HOME environment variables should be set.
For example: Let’s consider Oracle Database 21c installation using RPM manually by following this link, environment variables should be set as follows:
ORACLE_HOME/bin to the
PATH environment variable.
Oracle Instant Client
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.
The OCI library install few Client Shared Libraries that must be referenced on the machine where Metricbeat is installed. Please follow this 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 here.
The Oracle listener is a service that runs on the database host and receives requests from Oracle clients. Make sure that listener should be running. To check if the listener is running or not, run:
If the listener is not running, use the command to start:
Then, Metricbeat can be launched.
The following two types of host configurations are supported:
Old style host configuration for backwards compatibility:
hosts: ["email@example.com:1521/ORCLPDB1.localdomain as sysdba"]
DSN host configuration:
hosts: ['user="user" password="pass" connectString="0.0.0.0:1521/ORCLPDB1.localdomain"']
hosts: ['user="user" password="password" connectString="host:port/service_name" sysdba=true']
DSN host configuration is the recommended way to configure the Oracle Metricbeat Module as it supports the usage of special characters in the password.
Note: If the password contains the backslash (
\) character, it must be escaped with a backslash. For example, if the password is
my\_password, it should be written as
The following Metricsets are included in the module:
Includes performance related events which contains mainly cursor and cache based data.
Includes information about data files and temp files, grouped by Tablespace with free space available, used space, status of the data files, status of the Tablespace, etc.
Includes the system metric values captured for the most current time interval from Oracle system metrics.
The Oracle module supports the standard configuration options that are described in Modules. Here is an example configuration:
metricbeat.modules: # Module: oracle - module: oracle period: 10m metricsets: - tablespace enabled: true hosts: ['user="user" password="pass" connectString="0.0.0.0:1521/ORCLPDB1.localdomain"'] - module: oracle period: 10s metricsets: - performance enabled: true hosts: ['user="user" password="pass" connectString="0.0.0.0:1521/ORCLPDB1.localdomain"'] - module: oracle period: 60s metricsets: - sysmetric enabled: true hosts: ['user="user" password="pass" connectString="0.0.0.0:1521/ORCLPDB1.localdomain"'] # patterns: ["foo%","%bar","%foobar%"] # username: "" # password: ""
The following metricsets are available: