Addressing Multiple Application Instances creation with Different Ports in APM Insight PHP Agent

Addressing Multiple Application Instances creation with Different Ports in APM Insight PHP Agent

Issue: After installing the APM Insight PHP Agent, multiple application instances appear with different port numbers for the same application, which is expected to run only on port 80/443.

Issue Cause:
As per the PHP agent’s auto-discovery behavior, all application runtime ports are detected by design, resulting in monitor instances such as:
  1. apphost:0 (PHP-Application): Instance created to show background application activity.
  2. apphost:80 (PHP-Application):  Instance created to show web activity accessed via port 80.
  3. apphost:443 (PHP-Application): Instance created to show web activity accessed via port 443
Solution:  To monitor only a specific port (e.g., 443) and exclude others, follow these steps:
1. Confirm the primary port used for web traffic.
2. Exclude unnecessary ports by executing the following command from the agent installation path:
Quote
sh /opt/zpa/bin/agent_php.sh configure -zpa.exclude_ports "<app_port_which_not_required>"
For Example, To exclude port 80, execute the below cmd: 
Quote
sh /opt/zpa/bin/agent_php.sh configure -zpa.exclude_ports "80"

3. Restart the application to apply the changes.

4. Delete the excluded instances from the Applications Manager portal.

Note: Excluding ports prevents data collection for those instances. Ensure the correct port is monitored before making changes.

If any concerns, kindly contact appmanager-support@manageengine.com for further assistance.

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to install the APM Insight PHP Agent in an Azure Web App?

                      Follow these steps to install and configure the APM Insight PHP Agent in an Azure Web App. Step 1: Create a deployment script Navigate to the directory /home/apm/ (create it if it doesn’t exist). Create a new shell script named apm-phpagent-deploy.sh ...
                    • Uninstrumented Block of Code - APM Insight

                      In the traces tab --> Slowest Method Calls and Count we show if you find Un-instrumented block of code the reason is as follows: Basically, What is un-instrumented block of code in APM Insight? By default, APM Insight agent monitors known frameworks ...
                    • How to rename an existing APM - Java agent application's monitor?

                      In Applications Manager's APM(Application Performance Monitoring) doesn't support renaming applications/monitors from the web client. However, the application name of an existing application instance can be renamed in the `apminsight.conf` file and ...
                    • How to set the PHP path during agent installation?

                      This is only applicable to the agent versions 4.2 and above. For Linux Step 1: Download the installation script. wget -O InstallAgentPHP.zip https://www.manageengine.com/products/applications_manager/54974026/InstallDataExporter.zip && unzip ...
                    • Self monitor Applications Manager using APM Insight Java Agent

                      Applications Manager is built with Java, hence we can monitor it using APM Insight Java Agent to measure it's performance continuously, which can be very much useful. Setting up APM Insight Java Agent Follow the below steps to download and set up the ...