Oracle agent

Prerequisites

  • For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
  • 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 Windows and Linux based servers, use the following link.

curl --header "PRIVATE-TOKEN:{{TOKEN}}" --output Sixthsense-Meter-Agent.zip "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/32/packages/generic/Meter-Agent/latest/Meter-Agent-v4.0.1.zip"
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

For Linux:

./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

For Windows:

  1. Extract meter-agent.zip file and edit the configuration in the yaml file with cluster information.

  2. Open the command prompt with run as Administrator and enter the following command:

    nssm.exe install “Service_Name”

  3. In the NSSM service installer screen, the Application tab is selected by default.

  4. Enter the following details:

  • Path: meter-agent.exe full path
  • Startup directory: folder path
  • Arguments: yaml full name
  1. Click the Details tab.

  2. Enter the following details:

  • Display name: service display name
  • Description: service description
  • Setup type: select type for setup such as automatic.
  1. Click the Log on tab.
  2. Select Local System account radio button.
  3. Select Allow service to interact with desktop check box.
  4. Click Install service.