Configure Oracle Database collector

The newbIT Linux collector provides a plugin for monitoring Oracle databases. In order to setup this plugin there are some settings, that needs to be done within the Oracle DB and on the operating system level before it can be used.

Set Telegraf environment variables

NOTE: the following values will differ for your environement and serves as an example.

Add some basic Oracle variables to the telegraf environment file (located in /etc/default/telegraf):

ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
ORACLE_SID=XE

Configure Oracle user access

Grant access for the telegraf user using the external authentication method:

SHOW PARAMETER os_authent_prefix;

NAME                                                        TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix                               string               ops$

then, to hand-off authentication to an external body, in this case, the host (via ldap etc)

CREATE USER ops$telegraf identified externally;

This authentication method does not require to configure any usernames and passwords in local config files, as long as the user exists in the underlaying operating system.

Grant read access to required views and tables

V$INSTANCE
V$WAITCLASSMETRIC
V$SYSTEM_WAIT_CLASS
V$SYSMETRIC
V$PARAMETER
V$EVENTMETRIC
V$EVENT_NAME

Once these configuration steps have been completed, simply uncomment the required configuration entry (within /etc/telegraf/telegraf.conf) as shown below:

# # Read metrics from local Oracle database
[[inputs.oracollector]]
#   ##
#   ## All connection parameters are optional.
#   ##
#   ## specify address:
#   ## NOTE: this testing version ONLY gathers from the host that the agent is installed on
#   ##
#   ##   [host[port]]
#   ##
#   ## connection configuration.
#   ## maxlifetime - specify the maximum lifetime of a connection, in seconds.
#   ## default is 0s. better to change this to something like 300s which will prompt a reconnect approximately every 5 minutes
#   ## max_lifetime = "300s"

then, simply restart the telegraf agent:

sudo systemctl telegraf restart

Import Grafana Oracle dashboard

Import the newbIT Grafana dashboard for Oracle.
Filename: oracle_dashboard.json

results matching ""

    No results matching ""