Supported OS Linux Mac OS Windows

インテグレーションバージョン0.0.1

概要

このチェックは、Datadog Agent を通じて PHP OPcache を監視します。

計画と使用

ホストで実行されている Agent 用にこのチェックをインストールおよび構成する場合は、以下の手順に従ってください。コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照してこの手順を行ってください。

インフラストラクチャーリスト

php_opcache チェックをホストにインストールするには

  1. 開発ツールキットをインストールします。 どのマシンでも。

  2. ddev -e release build php_opcache を実行してパッケージをビルドします。

  3. Datadog Agent をダウンロードします

  4. ビルドの成果物を Agent をインストール済みのホストにアップロードし、以下を実行します。 datadog-agent integration install -w path/to/php_opcache/dist/<ARTIFACT_NAME>.whl.

OPcache

OPcache はデフォルトでメトリクスを公開しないため、このインテグレーションには、次の場所にあるメトリクスエクスポーターが含まれます。

/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/php_opcache/assets/exporter/opcache-dd-handler.php

Datadog integrations-extras リポジトリからエクスポーターをダウンロードできます。

Agent を構成する とき、このファイル名でエクスポーターを直接参照するか、Web サーバーで Agent のエイリアスを構成できます。たとえば、Apache を使用している場合、Web サーバーコンフィギュレーションファイルのエイリアスは次のようになります。

Alias /opcache-status /opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/php_opcache/assets/exporter/opcache-dd-handler.php
<Location /opcache-status>
    Require all denied
    Require local
</Location>

ブラウザトラブルシューティング

  1. php_opcache のパフォーマンスデータの収集を開始するには、Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの php_opcache.d/conf.yaml ファイルを編集します。使用可能なすべてのコンフィギュレーションオプションの詳細については、サンプル php_opcache.d/conf.yaml ファイルを参照してください。
    instances
      - url: http://localhost/opcache-status
    
  2. Agent を再起動します

検証

Agent の status サブコマンドを実行し、Checks セクションの php_opcache を探します。

リアルユーザーモニタリング

データセキュリティ

php_opcache.opcache_enabled
(gauge)
opcache enable flag
php_opcache.cache_full
(gauge)
cache full time
php_opcache.restart_pending
(gauge)
a restart pending
php_opcache.restart_in_progress
(gauge)
restart in progress
php_opcache.memory_usage.used_memory
(gauge)
used memory size
Shown as byte
php_opcache.memory_usage.free_memory
(gauge)
free memory
Shown as byte
php_opcache.memory_usage.wasted_memory
(gauge)
wasted memory
Shown as byte
php_opcache.memory_usage.current_wasted_percentage
(gauge)
current wasted percentage
Shown as percent
php_opcache.interned_strings_usage.buffer_size
(gauge)
interned string buffer size
Shown as byte
php_opcache.interned_strings_usage.used_memory
(gauge)
interned string used memory
Shown as byte
php_opcache.interned_strings_usage.free_memory
(gauge)
interned string free memory
Shown as byte
php_opcache.interned_strings_usage.number_of_strings
(gauge)
interned string number of string
Shown as byte
php_opcache.opcache_statistics.num_cached_scripts
(gauge)
num cached script
Shown as item
php_opcache.opcache_statistics.num_cached_keys
(gauge)
num cached keys
Shown as item
php_opcache.opcache_statistics.max_cached_keys
(gauge)
max cached keys
Shown as item
php_opcache.opcache_statistics.hits
(gauge)
cache hit
Shown as hit
php_opcache.opcache_statistics.start_time
(gauge)
cache start time
Shown as time
php_opcache.opcache_statistics.last_restart_time
(gauge)
last restart time
Shown as time
php_opcache.opcache_statistics.oom_restarts
(gauge)
oom restart count
Shown as occurrence
php_opcache.opcache_statistics.hash_restarts
(gauge)
hash restart count
Shown as occurrence
php_opcache.opcache_statistics.manual_restarts
(gauge)
description
Shown as occurrence
php_opcache.opcache_statistics.misses
(gauge)
number of cache miss
Shown as miss
php_opcache.opcache_statistics.blacklist_misses
(gauge)
number of black list misses
Shown as miss
php_opcache.opcache_statistics.blacklist_miss_ratio
(gauge)
percent of black list miss ratio
Shown as percent
php_opcache.opcache_statistics.opcache_hit_rate
(gauge)
percent of hit ratio
Shown as percent

ヘルプ

PHP OPcache インテグレーションには、イベントは含まれません。

ヘルプ

php_opcache.can_connect
Returns CRITICAL if the Agent is unable to connect to and collect metrics from the monitored OPcache instance. Returns OK otherwise.
Statuses: ok, critical

ヘルプ

ご不明な点は、Datadog のサポートチームまでお問合せください。