How to upgrade PHP Agent

How to upgrade PHP Agent

PHP Agent version below 3.2.2

Manual upgrade from user terminal:
            Whenever a new version of the agent goes live, it will be listed in the APM Insight Download page.                    
    1. The latest agent can also be downloaded from the Applications Manager web client, from the Add new Monitors page.
Windows
  1. Once the latest version has been downloaded, login to the machine in which the old agent is installed.
  2. Install the latest version by double clicking on the MSI file. During installation, an option to overwrite the existing installation will appear.

                             
  1. Proceed with the installation. It will overwrite the existing version without the loss of any existing settings.         
       
Linux           
  1. Once the latest version has been downloaded, Copy and unzip the agent under the /opt/zpa/bin directory (such that /opt/zpa/bin/zpa contains the extracted files of the latest agent) by executing the following commands one by one:                      
  1.   cp agent_php.zip /opt/zpa/bin
  2.  cd /opt/zpa/bin
  3. unzip agent_php.zip                              
  1. Copy the latest "upgrade" file from the extracted path to /opt/zpa/bin (overwrite the existing upgrade file) by executing the following command:
cp /opt/zpa/bin/zpa/bin/upgrade /opt/zpa/bin/
  1. Execute the upgrade binary by executing the following commands one by one:                                                         
  1. cd /opt/zpa/bin     
  2. chmod +x upgrade 
  3. ./upgrade                
  1. Restart the PHP agent using the following command:                                                         
sh run.sh restart
  1. Restart your web server / FPM server using the following commands:
                              #For Apache servers:                                      
$ sudo service apache2 restart
                              #For FPM servers:                                         
$ sudo service php-fpm restart
PHP Agent Version above 3.2.2

PHP agent can be upgraded in 2 ways:
  • Auto upgrade
  • Manual upgrade

Auto upgrade:
  • When this feature is enabled, the latest version of the agent will be automatically downloaded and deployed when it is available.
  • After the deployment process is complete, you will be requested to restart your application server. Once the server is restarted the updated version will take effect.
  • To enable this feature, APM -> Applications/Instances -> Monitor Actions > Edit -> APM Insight Agent Configuration Profile -> Edit Icon () -> Basic Configuration Profiles Enable Agent Auto-Upgrade.
Note: Auto upgrade feature will only work for major version changes in agent. Minor changes will not be covered in this.

Manual upgrade:
  • By default, auto-upgrade option is disabled. When a new version of the agent is available, users will be notified in the APM Instance view.

  • Users can initiate the upgrade process by clicking on Update Agent link in the above said notification. On doing so, the latest version will be downloaded and deployed.
  • After the deployment process is complete, you will be requested to restart your application server. Once the server is restarted, the updated version will take effect.
     

Note: For Windows agent, the manual restart is not required.

                  New to ADSelfService Plus?

                    • Related Articles

                    • Reconfigure APM Insight PHP agent after PHP version upgrade

                      If you have upgraded your PHP version and face problems in monitoring after the upgrade, here's how you can resolve it.In general, APM Insight PHP agent registers with the PHP version present in the server at the time of installation.So when you ...
                    • PHP Monitor Troubleshooting

                      PHP Monitor Errors and Troubleshooting Guide Check if the phpstats.php file in the webserver's document root. Ensure there is no modifications done in phpstats.php file Check if the correct PHP path is given. Retry with the "SSL is enabled" option ...
                    • Customize URL names using PHP agent API

                      With APM Insight PHP agent, you can customize URL names for your web transactions. Here's how you can do it: Open the PHP script of the transaction for which you want to customize the URL. Add the following snippet in any part of the PHP script <?php ...
                    • How to modify the APM Insight PHP agent's communication port?

                      The PHP agent uses ports 20021 and 20022 by default. You can change these ports by modifying the appropriate directive in the zpa.ini file (Linux) or php.ini file (Windows), as well as in the apminsight.conf file (Linux and Windows). Default ...
                    • How to upgrade Real User Monitoring Agent?

                      For RUM Agent v3.9 and above, refer the help page to know the steps for installing service pack (.ppm file). Steps to upgrade RUM Agent Take a backup of <RUMAgent_Home>/conf/ folder and place it outside of the RUM_Agent home folder. Uninstall the Old ...