Oracle agent

Prerequisites

  • URL/IP of the SixthSense collector (your tenant URL, which will be provided by the onboarding team.)
  • Access token from the SixthSense portal. For accessing the token, see Accessing your Access Token under Getting started with the Observability Portal.
  • Oracle agent image ss-oracle-agent
  • Database details (host name, port, database name, database user credentials, oracle service-name)
  • Use query to get service name: show parameter service_name;
  • Package token to download agent which will be provided by Customer Support.

Downloading the agent

For Linux based server, use the following URL to download the agent.

Download Linux oracle v2 agent

curl --header "PRIVATE-TOKEN:{{PACKAGE_TOKEN}}" --output oracle-agent-v2.tar.gz "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/32/packages/generic/Oracle-Agent/v1.0-amd64/sixthsense-oracle-agent.tar.gz"

For Windows based servers, use the following URL to download the agent.

Download Windows oracle v2 agent

curl --header "PRIVATE-TOKEN:{{PACKAGE_TOKEN}}" --output oracle-agent-v2.tar.gz "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/32/packages/generic/Oracle-Agent/v1.0-windows/sixthsense-oracle-agent.tar.gz"
note

Agent depends on the Operating System and architecture.

Database User Permissions

To capture database metrics from the oracle server, you must first create a Oracle user with select permissions.

Perform the following steps to create user and grant permissions.

From the oracle SQLPlus shell, create a user with required permissions.

ALTER SESSION set "_Oracle_SCRIPT"=true;
CREATE USER <username> IDENTIFIED BY "<user_password>";
GRANT CONNECT TO <username>;
GRANT SELECT ON cdb_data_files TO <username>;
GRANT SELECT ON cdb_pdbs TO <username>;
GRANT SELECT ON cdb_users TO <username>;
GRANT SELECT ON gv_$sysmetric TO <username>;
GRANT SELECT ON gv_$pgastat TO <username>;
GRANT SELECT ON gv_$instance TO <username>;
GRANT SELECT ON gv_$filestat TO <username>;
GRANT SELECT ON gv_$parameter TO <username>;
GRANT SELECT ON sys.dba_data_files TO <username>;
GRANT SELECT ON DBA_TABLESPACES TO <username>;
GRANT SELECT ON DBA_TABLESPACE_USAGE_METRICS TO <username>;
GRANT SELECT ON gv_$session TO <username>;
GRANT SELECT ON gv_$sesstat TO <username>;
GRANT SELECT ON gv_$statname TO <username>;
GRANT SELECT ON gv_$rowcache TO <username>;
GRANT SELECT ON gv_$sga TO <username>;
GRANT SELECT ON gv_$sysstat TO <username>;
GRANT SELECT ON v_$database TO <username>;
GRANT SELECT ON gv_$librarycache TO <username>;
GRANT SELECT ON gv_$sqlarea TO <username>;
GRANT SELECT ON gv_$system_event TO <username>;
GRANT SELECT ON dba_tablespaces TO <username>;
GRANT SELECT ON gv_$session_wait TO <username>;
GRANT SELECT ON gv_$rollstat TO <username>;
GRANT SELECT ON v_$instance TO <username>;
GRANT SELECT ON v_$sql TO <username>;
note

Replace your_host_name and your_strong_password with your values.

Configuring the Oracle Agent

Create a config.yaml file in the same directory.

# sixthsense-oracle-agent-v2 can be configured via yaml or environment variables
#
# Note: Environment Variables are given higher priority over yaml file
#
# Following are the environment variables that can be set:
# ENV VARIABLE CORRESPONDS TO
# SS_SERVICE_NAME service_name
# SS_AUTHENTICATION authentication
# SS_BACKEND sixthsense_backend
# SS_LOGGING logging
# SS_SECURE secure
sixthsense:
service_name: <name of the service>
# Login to Sixthsense UI --> Go to Settings on Side Navbar --> Copy Access Token
authentication: <authentication token from dashboard>
# debug|error|info
logging: <level> (level supported: debug ,error ,info)
sixthsense_backend: <Name of the Collector>
# SSL connection with backend true|false
secure: <boolean, flag if ssl is required>
# MY | ES | MS | CB | OR
type: <Database Type>(Select MY for MySql)
# cron: "* * * * *"(optional)
hostname: <Hostname of the database>
port: <Port number of the database>
user: <Database User>
password: <Password for the database user>
sid: <ServiceId of oracle db>
queryLimit: <query limit>
queryThresholdTime: <query threshold limit>

Running the Agent

./meter-agent config.yaml config1.yaml ...

In case of network restrictions, you can use proxy to connect to the SixthSense backend.

HTTPS_PROXY=proxy-server:port./meter-agent path/to/config.yaml