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.
This means that enabling multi-monitor allows you to monitor the transactions of tourism and cafe independently.
To enable multi-monitor for Linux
- Log in to Site24x7.
- Navigate to APM > APM Insight.
- Download and install the APM Insight PHP agent.
- Based on your web server, follow any of the below:
- For Apache
Add the following key to the .htaccess file 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 "zpa.application_name=APPLICATION_NAME";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.ini file. If it does not exist, create a new .user.ini file in the application directory.zpa.application_name="APPLICATION_NAME" - For Command Line Interface
Add the following key while executing your php script from the terminal.
php -d zpa.application_name="APPLICATION_NAME" /path/to/your/script
- For Apache
To enable multi-monitor for Windows
- Log in to Site24x7. Navigate to APM > APM Insight.
- Download and install the APM Insight PHP agent.
- Navigate to the website's directory.
- 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.
zpa.application_name="APPLICATION_NAME"
- 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.