Configuring PHP monitoring
You must configure the Monitoring Agent for PHP so that the agent can collect data from the PHP application that is being monitored.
Before you begin
- Ensure that you install the php-process package. If you use the
yum install
command to install PHP, run theyum install php-process
command to install the php-process package. - Ensure that the Apache HTTPD server is started before you configure the agent.Open the Apache HTTP Server httpd.conf configuration file and ensure that both the
mod_status
andExtendedStatus On
options are enabled. For example:
In the given example, http://127.0.0.1/server-status must work fine for the agent to work properly.ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Allow from all Allow from 127.0.0.1 </Location>
Note: You must have Lynx or Links installed on Linux® for the agent to get monitoring data.Make sure that the command
apachectl status
works fine in the monitored Apache server with no code changes to theapachectl
command. Lynx must be installed for the commandapachectl status
to work properly.
About this task
To avoid permission issues when you configure the agent, be sure to use the same root user or non-root user ID that was used for installing the agent. If you installed your agent as a selected user and want to configure the agent as a different user, see Configuring agents as a non-root user. If you installed and configured your agent as a selected user and want to start the agent as a different user, see Starting agents as a non-root user.
instance_name:host_name:pc
,
where pc is your two character product code. The
Managed System Name is limited to 32 characters. The instance name
that you specify is limited to 28 characters, minus the length of
your host name. For example, if you specify PHP2
as
your instance name, your managed system name is PHP2:hostname:PJ
. Procedure
Results
What to do next
You can verify the PHP agent data is displayed in the Cloud APM console.
- In a web browser, enter the following URL
http://hostname:port/wp-admin/
. - Access the administrative page by navigating to Plugins > Installed Plugins.
- Ensure that the PHP agent plug-in is activated. The PHP agent plug-in is listed as WordPress Agent. Typically, the plug-in is already activated. If it is not already activated, click on Activate.