Setting Up Database Monitoring for Oracle Autonomous Database

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

データベースモニタリングは、クエリサンプルを公開することで、Oracle データベースを深く可視化し、さまざまなワークロードをプロファイリングして問題を診断します。

The Agent collects telemetry directly from the database by logging in as a read-only user.

Before you begin

サポート対象の Oracle バージョン
11g、12c、18c、19c、21c
サポート対象の Agent バージョン
7.53.0+
Performance impact
The default Agent configuration for Database Monitoring is conservative, but you can adjust settings such as the collection interval and query sampling rate to better suit your needs. For most workloads, the Agent represents less than one percent of query execution time on the database and less than one percent of CPU.

Database Monitoring runs as an integration on top of the base Agent (see benchmarks).
Proxies, load balancers, and connection poolers
The Agent must connect directly to the host being monitored. The Agent should not connect to the database through a proxy, load balancer, or connection pooler. Each Agent must have knowledge of the underlying hostname and should stick to a single host for its lifetime, even in cases of failover. If the Datadog Agent connects to different hosts while it is running, the values of metrics will be incorrect.
Data security considerations
See Sensitive information for information about what data the Agent collects from your databases and how to ensure it is secure.

Setup

Complete the following to enable Database Monitoring with your Oracle database:

  1. Create the Datadog user
  2. Grant the user access to the database
  3. Install the Agent
  4. Configure the Agent
  5. Install or verify the Oracle integration
  6. Validate the setup

Create the Datadog user

すでにレガシー Oracle インテグレーションがインストールされている場合、ユーザーはすでに存在するので、この手順は省略できます。

サーバーに接続するための読み取り専用ログインを作成し、必要な権限を付与します。

CREATE USER datadog IDENTIFIED BY <YOUR_PASSWORD>;

Grant the user access to the database

grant create session to datadog ;
grant select on v$session to datadog ;
grant select on v$database to datadog ;
grant select on v$containers to datadog;
grant select on v$sqlstats to datadog ;
grant select on v$instance to datadog ;
grant select on dba_feature_usage_statistics to datadog ;
grant select on V$SQL_PLAN_STATISTICS_ALL to datadog ;
grant select on V$PROCESS to datadog ;
grant select on V$SESSION to datadog ;
grant select on V$CON_SYSMETRIC to datadog ;
grant select on CDB_TABLESPACE_USAGE_METRICS to datadog ;
grant select on CDB_TABLESPACES to datadog ;
grant select on V$SQLCOMMAND to datadog ;
grant select on V$DATAFILE to datadog ;
grant select on V$SYSMETRIC to datadog ;
grant select on V$SGAINFO to datadog ;
grant select on V$PDBS to datadog ;
grant select on CDB_SERVICES to datadog ;
grant select on V$OSSTAT to datadog ;
grant select on V$PARAMETER to datadog ;
grant select on V$SQLSTATS to datadog ;
grant select on V$CONTAINERS to datadog ;
grant select on V$SQL_PLAN_STATISTICS_ALL to datadog ;
grant select on V$SQL to datadog ;
grant select on V$PGASTAT to datadog ;
grant select on v$asm_diskgroup to datadog ;
grant select on v$rsrcmgrmetric to datadog ;
grant select on v$dataguard_config to datadog ;
grant select on v$dataguard_stats to datadog ;
grant select on v$transaction to datadog;
grant select on v$locked_object to datadog;
grant select on dba_objects to datadog;
grant select on cdb_data_files to datadog;
grant select on dba_data_files to datadog;

Securely store your password

Store your password using secret management software such as Vault. You can then reference this password as ENC[<SECRET_NAME>] in your Agent configuration files: for example, ENC[datadog_user_database_password]. See Secrets Management for more information.

The examples on this page use datadog_user_database_password to refer to the name of the secret where your password is stored. It is possible to reference your password in plain text, but this is not recommended.

Install the Agent

See the DBM Setup Architecture documentation to determine where to install the Agent. The Agent doesn’t require any external Oracle clients.

For installation steps, see the Agent installation instructions.

Configure the Agent

Download the wallet zip file from the Oracle Cloud and unzip it.

Create the Oracle Agent conf file /etc/datadog-agent/conf.d/oracle.d/conf.yaml. See the sample conf file for all available configuration options.

Note: The configuration subdirectory for the Agent releases below 7.53.0 is oracle-dbm.d.

Set the protocol and wallet configuration parameters.

init_config:
instances:
  - server: '<HOST_1>:<PORT>'
    service_name: "<SERVICE_NAME>" # The Oracle CDB service name
    username: 'datadog'
    password: 'ENC[datadog_user_database_password]'
    protocol: TCPS
    wallet: <YOUR_WALLET_DIRECTORY>
    dbm: true
    tags:  # Optional
      - 'service:<CUSTOM_SERVICE>'
      - 'env:<CUSTOM_ENV>'
  - server: '<HOST_2>:<PORT>'
    service_name: "<SERVICE_NAME>" # The Oracle CDB service name
    username: 'datadog'
    password: 'ENC[datadog_user_database_password]'
    protocol: TCPS
    wallet: <YOUR_WALLET_DIRECTORY>
    dbm: true
    tags:  # Optional
      - 'service:<CUSTOM_SERVICE>'
      - 'env:<CUSTOM_ENV>'

After all Agent configuration is complete, restart the Datadog Agent.

Install or verify the Oracle integration

First-time installations

On the Integrations page in Datadog, install the Oracle integration for your organization. This installs an Oracle dashboard in your account that can be used to monitor the performance of your Oracle databases.

Existing installations

既存のインストールの場合、構成が conf.d/oracle-dbm.d/ ディレクトリにあることを確認します。レガシー構成を conf.d/oracle.d/ ディレクトリから移行する必要があるかもしれません。

次のコマンドを使用して、Oracle インテグレーションをレガシーインテグレーションから新しいインテグレーションに移行します。

cp /etc/datadog-agent/conf.d/oracle.d/conf.yaml /etc/datadog-agent/conf.d/oracle-dbm.d/conf.yaml

レガシーインテグレーションを非アクティブにします。

mv /etc/datadog-agent/conf.d/oracle.d/conf.yaml /etc/datadog-agent/conf.d/oracle.d/conf.yaml.bak

レガシーインテグレーションを非アクティブにすると、システムメトリクスが 2 回送信されなくなります。

Datadog Agent は外部の Oracle クライアントを必要としないので、新しいパラメーターファイル /etc/datadog-agent/conf.d/oracle-dbm.d/conf.yaml から jdbc_driver_path 構成パラメーターを削除します。

Validate the setup

Run the Agent’s status subcommand and look for oracle under the Checks section. Navigate to the DBM Oracle Database Overview dashboard and Databases page in Datadog to get started.

Custom queries

Database Monitoring supports custom queries for Oracle databases. See the conf.yaml.example to learn more about the configuration options available.

Running custom queries may result in additional costs or fees assessed by Oracle.

Further reading

お役に立つドキュメント、リンクや記事: