New Relic Distribution of OpenTelemetry(NRDOT)コレクターを使用したデータベース監視、クエリ分析、およびシステムヘルスメトリクスにより、Oracle Autonomous Database(ADB)のパフォーマンスに関する包括的なインサイトを取得します。
ガイド付きインストレーション
代わりにNew Relic UIからインストールするには、one.newrelic.com > Integrations & Agents > Oracle (OpenTelemetry) に移動してください。このページでは、手動インストレーションについてのみ説明します。
前提条件
始める前に、次のものがあることを確認してください。
- 有効なNew Relicライセンスキー
- サポートされているアーキテクチャー: AMD64 および ARM64 を搭載した Linux
- New Relic OTLPエンドポイントへのネットワーク接続
- Oracleデータベース
19c以降
NRDOT Collectorをインストールする
Linux 環境に適したインストレーション配布方法を選択します。
データベースユーザーを構成する
ADB Oracleデータベースインスタンスに必要な権限を持つ監視ユーザーを作成します。ターゲットADB内でSYSとして以下のステートメントを実行し、ローカル監視ユーザーを作成します:
CREATE USER <YOUR_DB_USERNAME> IDENTIFIED BY "<YOUR_DB_PASSWORD>";GRANT CREATE SESSION TO <YOUR_DB_USERNAME>;Autonomous Databaseの監視権限の付与
ADB内でadminとしてこれらのコマンドを実行します。これにより、監視ツールがメトリクスを収集し、イベントを追跡し、データベースインスタンスを見つけるために必要な基本的なアクセス権が付与されます。
GRANT SELECT ON SYS.V_$INSTANCE TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$DATABASE TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$CONTAINERS TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$DATAFILE TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$PDBS TO <YOUR_DB_USERNAME>; GRANT SELECT ON SYS.V_$SYSSTAT TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$SYSMETRIC TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$SESSION TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$RESOURCE_LIMIT TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$OSSTAT TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$SGAINFO TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$ROWCACHE TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$PARAMETER TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.DBA_TABLESPACE_USAGE_METRICS TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.DBA_TABLESPACES TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.DBA_DATA_FILES TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.DBA_FREE_SPACE TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.DBA_RECYCLEBIN TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$SQL TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$SQL_PLAN_STATISTICS_ALL TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$LOCK TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$SESSION_EVENT TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.DBA_PROCEDURES TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.DBA_OBJECTS TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$PROCESS TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.V_$TRANSACTION TO <YOUR_DB_USERNAME>;GRANT SELECT ON SYS.CDB_SERVICES TO <YOUR_DB_USERNAME>;NRDOT Collectorを構成する
ADB固有の設定でNRDOT Collectorを設定します。以下の内容で設定ファイル(例:adb-config.yaml)を作成します:
完全な設定
この設定は、必須のベースラインメトリクスをキャプチャします。完全なメトリクスカタログを確認するには、設定リファレンスを参照してください。
1receivers:2 nroracledb/adb:3 datasource: "oracle://newrelic:YOUR_PASSWORD@adb.example.oraclecloud.com:1522/YOUR_SERVICE_NAME?ssl=true&ssl%20verify=true"4 collection_interval: 15s5events:6 db.server.query_sample:7 enabled: true8 db.server.top_query:9 enabled: true10 db.server.session.wait_sample:11 enabled: true12 db.server.top_procedure:13 enabled: true14 db.server.query_plan:15 enabled: true16
17top_query_collection:18 max_query_sample_count: 100019 top_query_count: 20020 collection_interval: 60s21 allowed_comment_keys:22 - nr_service_guid23
24query_sample_collection:25 max_rows_per_query: 10026 allowed_comment_keys:27 - nr_service_guid28
29session_wait_event_collection:30 max_rows_per_query: 10031
32top_procedure_collection:33 max_procedure_sample_count: 100034 top_procedure_count: 25035 collection_interval: 60s36
37 # Metrics configuration - This baseline configuration captures essential metrics. To enable advanced monitoring and extended telemetry, refer to the full configuration documentation38metrics:39 oracledb.buffer_cache.utilization:40 enabled: true41 attributes:42 - oracle.db.pdb43 oracledb.consistent_gets:44 enabled: true45 attributes:46 - oracle.db.pdb47 oracledb.cpu_time:48 enabled: true49 attributes:50 - oracle.db.pdb51 oracledb.database.cpu.utilization:52 enabled: true53 attributes:54 - oracle.db.pdb55 oracledb.database.wait.utilization:56 enabled: true57 attributes:58 - oracle.db.pdb59 oracledb.db_block_gets:60 enabled: true61 attributes:62 - oracle.db.pdb63 oracledb.enqueue_deadlocks:64 enabled: true65 attributes:66 - oracle.db.pdb67 oracledb.execution.utilization:68 enabled: true69 attributes:70 - oracledb.parse.type71 - oracle.db.pdb72 oracledb.executions:73 enabled: true74 attributes:75 - oracle.db.pdb76 oracledb.hard_parses:77 enabled: true78 attributes:79 - oracle.db.pdb80 oracledb.host.cpu.utilization:81 enabled: true82 attributes:83 - oracle.db.pdb84 oracledb.library_cache.utilization:85 enabled: true86 attributes:87 - oracle.db.pdb88 oracledb.logical_reads:89 enabled: true90 attributes:91 - oracle.db.pdb92 oracledb.logons:93 enabled: true94 attributes:95 - oracle.db.pdb96 oracledb.parse.rate:97 enabled: true98 attributes:99 - oracledb.parse.result100 - oracle.db.pdb101 oracledb.parse_calls:102 enabled: true103 attributes:104 - oracle.db.pdb105 oracledb.pga_memory:106 enabled: true107 attributes:108 - oracle.db.pdb109 oracledb.physical_io.requests:110 enabled: true111 attributes:112 - disk.io.direction113 - disk.io.block_size114 - oracle.db.pdb115 oracledb.physical_reads:116 enabled: true117 attributes:118 - oracle.db.pdb119 oracledb.physical_writes:120 enabled: true121 attributes:122 - oracle.db.pdb123 oracledb.processes.usage:124 enabled: true125 oracledb.sessions.usage:126 enabled: true127 attributes:128 - session_type129 - session_status130 - oracle.db.pdb131 oracledb.sga.usage:132 enabled: true133 attributes:134 - oracledb.sga.component.name135 oracledb.shared_pool.utilization:136 enabled: true137 attributes:138 - oracle.db.pdb139 oracledb.sql_service.response.duration:140 enabled: true141 attributes:142 - oracle.db.pdb143 oracledb.sqlnet.io.transferred:144 enabled: true145 attributes:146 - network.io.direction147 - destination.type148 - oracle.db.pdb149 oracledb.tablespace_size.usage:150 enabled: true151 attributes:152 - tablespace_name153 - oracle.db.pdb154 oracledb.transactions.usage:155 enabled: true156 oracledb.user_commits:157 enabled: true158 attributes:159 - oracle.db.pdb160 oracledb.user_rollbacks:161 enabled: true162 attributes:163 - oracle.db.pdb164
165 # Resource attributes attached to all metrics/logs (all enabled by default)166resource_attributes:167 oracle.db.edition:168 enabled: true169exporters:170 otlp/newrelic:171 endpoint: https://otlp.nr-data.net:4318172headers:173 api-key: YOUR_LICENSE_KEY174 compression: gzip175retry_on_failure:176 enabled: true177 initial_interval: 5s178 max_interval: 30s179 max_elapsed_time: 300s180sending_queue:181 enabled: true182 sizer: bytes183 queue_size: 100_000_000184 num_consumers: 10185 batch:186 sizer: bytes187 max_size: 1_000_000188 min_size: 0189 flush_timeout: 5s190service:191pipelines:192 metrics/oracledb:193 receivers: [nroracledb/adb]194 exporters: [otlp/newrelic]195 logs/oracledb:196 receivers: [nroracledb/adb]197 exporters: [otlp/newrelic]ヒント
もできます。
- 複数のレシーバーを構成する:1つのコレクターから複数のOracle データベースインスタンスをモニターします。
- SQLクエリレシーバーの構成:Oracleデータベースからカスタムメトリックを収集します。
- OracleデータベースをAPMとリンクする:アプリケーションパフォーマンスをデータベース操作と関連付けます。これにより、どのアプリケーションが特定のデータベースワークロードを生成しているかを正確に確認できます。
- シークレット管理のセットアップ:データベースの認証情報などの機密情報を安全に管理します。これにより、設定ファイルへの機密データのハードコーディングを回避し、監視セットアップのセキュリティを強化できます。
NRDOT Collectorを再起動します
コレクターを設定した後、NRDOT Collectorサービスを再起動して変更を適用します:
$sudo systemctl restart nrdot-collectorコレクターが正常に実行されていることを確認するには、サービスステータスを確認します:
$sudo systemctl status nrdot-collectorヒント
新しい設定を確実に適用するために、設定を変更した後は常にNRDOT Collectorを再起動してください。
データを探す、使う
データの収集が開始されると、New Relic UIから包括的なOracleデータベース監視にアクセスできます。
New RelicでOracleデータベースエンティティを見つけるには:
- https://one.newrelic.com > All Capabilities > Databasesに移動します。
- 検索条件を
instrumentation.provider = opentelemetryに設定します。 - エンティティのリストからOracle ADBデータベースを選択してください。