Start Monitoring PHP

With just a few steps, you can start monitoring your PHP applications in AppDynamics. Getting Started Wizard in the controller makes it easy to install AppDynamics agent and start gathering useful information about your application. You can choose to use a SaaS Controller or download and install the AppDynamics Controller to your own environment.

If the PHP app is part of a larger distributed application architecture, you'll see where it sits in that architecture and transactions flow to and from this app.
Video Thumbnail

The PHP Agent is consisted of an agent component and a proxy component.

The PHP agent component discovers, maps and tracks metrics for business transactions, application services, and backends in your PHP application by injecting instrumentation into the application at runtime.

The proxy component is a Java daemon process that handles the communication between the PHP agent component and the Controller. The proxy reports the performance metrics to the Controller, where the data is stored, baselined, and analyzed. You can access this performance data interactively using the Controller console or programmatically using the AppDynamics REST API.

By default, the proxy component is automatically started when you start the PHP Agent. Certain deployments require starting the proxy manually.

To learn more, please visit AppDynamics for PHP Architecture.

PHP Agent
The AppDynamics PHP agent does all the work of instrumenting the application, collecting metrics and reporting those metrics to the Controller. Getting Started Wizard is the easiest way to install the agent. You can also install the PHP Agent using either a shell script(install.sh) or RPM Package Manager. To get started, you will need to:

1. Confirm that you have a supported environment installed on the server. 
  • PHP Versions: 5.2+ (For 5.2, does not detect mySQL backends instantiated with the new keyword). 
  • PHP Web Servers: Apache 2.2 or 2.4 (in prefork mode using mod_php, or in worker MPM mode using mod_fastcgi with php-fpm or mod_fcgid with php-cgi) or any web server compatible with php-fpm
2. Have root access to run the installer.
3. Have an AppDynamics Controller. 
Getting a SaaS Controller is easy. Just sign up for an account and start a trial. It's free. No credit card required.

Now you're all set to install the agent!


From this point, you can go to the Controller  Home -> Getting Started -> Getting Started Wizard and follow the steps to install the agent:
  1. Choose your operating system
  2. Configuring controller host and port
  3. Set application and tier
  4. Download and install the agent
  5. Restart your application
Once you have correctly installed the agent and restarted the PHP application, you should see the first dotted line between your application and AppDynamics Controller turn green. That means your agent is successfully connected to the Controller.

When you see the second dotted line turning green requires load generated on the application. If you're using a production environment, this will happen when customers have interactions with your application. This step may take a few minutes.

You can also choose to download the agent from http://download.appdynamics.com.
PHP Agent
Once you have configured the agent is configured and it has connected to the Controller, you will see your app showing up in the list of Applications. Under Tiers & Nodes, your app tier will appear green to indicate it's healthy state.

Without load, Application Dashboard is empty. When transaction load flow in, your application tier will show up in the flowmap.
PHP Flowmap
As mentioned above, the PHP agent is composed of a proxy component and an agent component, where the proxy component handles connection between the agent and the Controller. In the Getting Started Wizard, if the first dotted line is not connecting (or when PHP Tier is not showing up in the Tiers & Nodes tab), it means that the proxy component is not configured correctly. To troubleshoot:
  1. Verify AppDynamics settings block exists in the configuration by running 'php -i | less'. You should see an appdynamics_agent.ini and a configuration block listing appdynamics ini values.
  2. Make sure the proxy is running by command 'ps aux | grep java' and inspect the process list for 'com.appdynamics.ee.agent.proxy.kernel.Proxy'
  3. Confirm permissions are correctly set.
If the second dotted line is not connecting (or the tier successfully show up, but data is not being reported), it's likely that the agent component is not configured correctly. To troubleshoot:
  1. Check if agent is installed in the correct directory. If not, uninstall and re-install the agent following these instructions.
  2. Check error messages in the installation output. If necessary, manually configure Controller information.
Now you have successfully instrumented your PHP application, here are the key concepts that will help you unveil the power of AppDynamics.
Get the latest update from AppDynamics Blog - PHP.
Sign in to AppDynamics account to get the PHP Performance Cheat Sheet.
Thanks for choosing AppDynamics!
https://vimeo.com/157790333

Introduction

With just a few steps, you can start monitoring your PHP applications in AppDynamics. Getting Started Wizard in the controller makes it easy to install AppDynamics agent and start gathering useful information about your application. You can choose to use a SaaS Controller or download and install the AppDynamics Controller to your own environment.

If the PHP app is part of a larger distributed application architecture, you'll see where it sits in that architecture and transactions flow to and from this app.
PHP Agent

How PHP agent works

The PHP Agent is consisted of an agent component and a proxy component.

The PHP agent component discovers, maps and tracks metrics for business transactions, application services, and backends in your PHP application by injecting instrumentation into the application at runtime.

The proxy component is a Java daemon process that handles the communication between the PHP agent component and the Controller. The proxy reports the performance metrics to the Controller, where the data is stored, baselined, and analyzed. You can access this performance data interactively using the Controller console or programmatically using the AppDynamics REST API.

By default, the proxy component is automatically started when you start the PHP Agent. Certain deployments require starting the proxy manually.

To learn more, please visit AppDynamics for PHP Architecture.

Before starting

The AppDynamics PHP agent does all the work of instrumenting the application, collecting metrics and reporting those metrics to the Controller. Getting Started Wizard is the easiest way to install the agent. You can also install the PHP Agent using either a shell script(install.sh) or RPM Package Manager. To get started, you will need to:

1. Confirm that you have a supported environment installed on the server. 
  • PHP Versions: 5.2+ (For 5.2, does not detect mySQL backends instantiated with the new keyword). 
  • PHP Web Servers: Apache 2.2 or 2.4 (in prefork mode using mod_php, or in worker MPM mode using mod_fastcgi with php-fpm or mod_fcgid with php-cgi) or any web server compatible with php-fpm
2. Have root access to run the installer.
3. Have an AppDynamics Controller. 
Getting a SaaS Controller is easy. Just sign up for an account and start a trial. It's free. No credit card required.

Now you're all set to install the agent!


PHP Agent

Download agent and install

From this point, you can go to the Controller  Home -> Getting Started -> Getting Started Wizard and follow the steps to install the agent:
  1. Choose your operating system
  2. Configuring controller host and port
  3. Set application and tier
  4. Download and install the agent
  5. Restart your application
Once you have correctly installed the agent and restarted the PHP application, you should see the first dotted line between your application and AppDynamics Controller turn green. That means your agent is successfully connected to the Controller.

When you see the second dotted line turning green requires load generated on the application. If you're using a production environment, this will happen when customers have interactions with your application. This step may take a few minutes.

You can also choose to download the agent from http://download.appdynamics.com.
PHP Flowmap

Generate load and see flowmap

Once you have configured the agent is configured and it has connected to the Controller, you will see your app showing up in the list of Applications. Under Tiers & Nodes, your app tier will appear green to indicate it's healthy state.

Without load, Application Dashboard is empty. When transaction load flow in, your application tier will show up in the flowmap.

Troubleshooting agent installation

As mentioned above, the PHP agent is composed of a proxy component and an agent component, where the proxy component handles connection between the agent and the Controller. In the Getting Started Wizard, if the first dotted line is not connecting (or when PHP Tier is not showing up in the Tiers & Nodes tab), it means that the proxy component is not configured correctly. To troubleshoot:
  1. Verify AppDynamics settings block exists in the configuration by running 'php -i | less'. You should see an appdynamics_agent.ini and a configuration block listing appdynamics ini values.
  2. Make sure the proxy is running by command 'ps aux | grep java' and inspect the process list for 'com.appdynamics.ee.agent.proxy.kernel.Proxy'
  3. Confirm permissions are correctly set.
If the second dotted line is not connecting (or the tier successfully show up, but data is not being reported), it's likely that the agent component is not configured correctly. To troubleshoot:
  1. Check if agent is installed in the correct directory. If not, uninstall and re-install the agent following these instructions.
  2. Check error messages in the installation output. If necessary, manually configure Controller information.

Learn how to use AppDynamics

Now you have successfully instrumented your PHP application, here are the key concepts that will help you unveil the power of AppDynamics.
Get the latest update from AppDynamics Blog - PHP.
Sign in to AppDynamics account to get the PHP Performance Cheat Sheet.
Thanks for choosing AppDynamics!