Fortinet black logo

User Guide

PHP OPCache

24.2.0
Copy Link
Copy Doc ID af1daa65-c273-11ec-9fd1-fa163e15d75b:937130
Download PDF

PHP OPCache

To configure the PHP OPCache metrics, Python 2.7 or above is required in addition to some additional setup steps which are outlined below.

OPCache Configuration

To Install:

  • Copy the file from /usr/lib/fm-agent/extras/opcache.php into a location that can be served by your webserver.

  • Important: Make sure to lock down that file so only the localhost can access it.

  • Edit your FortiMonitor agent config file to include the path to the OPCache script (see config section below).

Agent Configuration

You'll need to add OPCache configuration block into Agent’s configuration file, which can be found at /etc/panopta-agent/panopta_agent.cfg

[opcache]

opcache_url = http://localhost/opcache-url-path/opcache.php

Control Panel Configuration

Like other application monitoring, OPCache monitoring is added to a server via the Monitoring Catalog. If you don't see OPCache as a discovered resource, you may need to Rebuild the FortiMonitor Agent metadata.

If you haven't yet read Add FortiMonitor Agent checks, please do that first.

Once OPCache is added, you can begin to monitor any of the metrics below.

Metric

Unit

Blacklist Misses

Buffer Size

MB

Cache Hit Rate

%

Current % Wasted Cache

%

Hash Restarts

Hits

Manual Restarts

Max Cached Keys

Memory Free

MB

Memory Used

MB

Memory Wasted

MB

Misses

Number of Cached Keys

Number of Cached Scripts

Number of Strings

OOM Restarts

PHP OPCache

To configure the PHP OPCache metrics, Python 2.7 or above is required in addition to some additional setup steps which are outlined below.

OPCache Configuration

To Install:

  • Copy the file from /usr/lib/fm-agent/extras/opcache.php into a location that can be served by your webserver.

  • Important: Make sure to lock down that file so only the localhost can access it.

  • Edit your FortiMonitor agent config file to include the path to the OPCache script (see config section below).

Agent Configuration

You'll need to add OPCache configuration block into Agent’s configuration file, which can be found at /etc/panopta-agent/panopta_agent.cfg

[opcache]

opcache_url = http://localhost/opcache-url-path/opcache.php

Control Panel Configuration

Like other application monitoring, OPCache monitoring is added to a server via the Monitoring Catalog. If you don't see OPCache as a discovered resource, you may need to Rebuild the FortiMonitor Agent metadata.

If you haven't yet read Add FortiMonitor Agent checks, please do that first.

Once OPCache is added, you can begin to monitor any of the metrics below.

Metric

Unit

Blacklist Misses

Buffer Size

MB

Cache Hit Rate

%

Current % Wasted Cache

%

Hash Restarts

Hits

Manual Restarts

Max Cached Keys

Memory Free

MB

Memory Used

MB

Memory Wasted

MB

Misses

Number of Cached Keys

Number of Cached Scripts

Number of Strings

OOM Restarts