Multi-monitor Configuration for PHP Applications

With multi-monitor configuration, you can separately monitor the performance of all individual applications running on the same app server, allowing you to assess your application performance at a granular level.

Let's say you have two PHP applications operating on your application server.

By default, the transactions of all applications coming from the same app server are shown collectively under APM > Transactions > Web.

For example, in the image below, PHP-APPLICATION is the name of the application monitor. There are two applications, cafe and tourism, running on the same application server.

You can see the transactions of these two applications in the Transactions tab shown below.

Transactions tab

This means that enabling multi-monitor allows you to monitor the transactions of tourism and cafe independently.

Monitoring multiple monitors independently using multi-monitor

To enable multi-monitor for Linux

  1. Log in to Site24x7.
  2. Navigate to APM > APM Insight.
  3. Download and install the APM Insight PHP agent.
  4. Based on your web server, follow any of the below:
    • For Apache
      Add the following key to the .htaccessfile present in your application directory.
      php_value zpa.application_name "APPLICATION_NAME"
      If .htaccess is not present, create it in your application directory and make sure that it is allowed to override directives by modifying the server configuration.
    • For Nginx
      Add the following key to the corresponding location block or server block in the application's Nginx configuration file.
      fastcgi_param PHP_VALUE
      Please note that modifying PHP configuration via fastcgi_param might not work if Nginx and PHP-FPM are running in separate containers. In such cases, you must directly modify the PHP-FPM configuration.
    • For PHP-FPM
      Add the following key to your application's .user.inifile. If it does not exist, create a new .user.ini file in the application directory.

To enable multi-monitor for Windows

  1. Log in to Site24x7. Navigate to APM > APM Insight.
  2. Download and install the APM Insight PHP agent.
  3. Navigate to the website's directory.
  4. Add the following configuration to the .user.ini file (The default file name is .user.ini, but it can have a different name) in the website's root directory.
  5. You can find the setting below in your php.ini file.
    ; php.ini Options ;
    ; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
    ;user_ini.filename = ".user.ini"
  • If you have a different file name instead of .user.ini, add the respective file name.
  • Perform some transactions in the respective application to allow the agent to identify them as individual monitors.
  • When multi-monitor is enabled, each monitor is considered a separate APM application and thus each consumes an advanced monitor license.
Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.