This check monitors PHP OPcache through the Datadog Agent.
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the Autodiscovery Integration Templates for guidance on applying these instructions.
To install the php_opcache
check on your host:
-
Install the developer toolkit. on any machine.
-
Run
ddev release build php_opcache
to build the package. -
Upload the build artifact to any host with an Agent and run
datadog-agent integration install -w path/to/php_opcache/dist/<ARTIFACT_NAME>.whl
.
OPcache does not expose metrics by default so this integration includes a metric exporter, located here:
/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/php_opcache/assets/exporter/opcache-dd-handler.php
You can download the exporter from here.
When you configure your Agent (the instances
setting, described next), you can refer to the exporter directly by this file name, or you can configure an alias for it on your web server. For example, if you're using Apache, the alias in the web server configuration file would look like this:
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>
- Edit the
php_opcache.d/conf.yaml
file, in theconf.d/
folder at the root of your Agent's configuration directory to start collecting yourphp_opcache
performance data. See the samplephp_opcache.d/conf.yaml
file for all available configuration options.instances - url: http://localhost/opcache-status
- Restart the Agent.
Run the Agent's status subcommand and look for php_opcache
under the Checks section.
See metadata.csv for a list of metrics provided by this check.
php_opcache
does not include any service checks.
php_opcache
does not include any events.
Need help? Contact Datadog support.