Steps for APM Insight agents to migrate to a new DC

DC migration steps for APM Insight agents

For Server based installations

1. Obtain the new device key.
2. Update the license.key value in the APM Insight configuration file (or the environment variable mentioned) with the new device key. The location varies for each agent, as listed below:

 Agent type
 File name
 File location (Relative or Absolute)
 JAVA
 apminsight.conf
 <apminsight-javaagent.zip Extracted Directory>/
 RUBY
 apminsight.conf
 <APP_HOME>/ 
 DOTNET
 apminsight.conf
 %ProgramData%\DotnetAgent\<appname>
 DOTNET_CORE
 apminsight.conf
 <ApplicationPublishDirectory>\DotnetAgent\
 PHP_WINDOWS
 apminsight.conf
 <INSTALLPATH>\APM Insight PHP Agent\zpa\bin
 PHP
 apminsight.conf
 /opt/zpa/bin/
 NODEJS
 apminsighnode.json
 <application root directory> 
 PYTHON
 apminsight_info.json
 <application root directory> 
 All (except PHP)
 S247_LICENSE_KEY
 System Environment variable
 DOTNET_CORE (Windows)
 S247_LICENSE_KEY
 Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC 

 Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS

3. Log in to the server and delete the existing instance information files. Please find the below for the location of the instance files based on the agent:

 Agent type
 File name
 File location (Relative or Absolute)
 JAVA
 apminsight.info
 <apminsight-javaagent.zip Extracted Directory>/
 RUBY
 apminsight.info
 <APP_HOME>/ 
 DOTNET
 apminsight.net.info
 %ProgramData%\DotnetAgent\<Appname>
 DOTNET_CORE
 apminsight.net.info
 <ApplicationPublishDirectory>\DotnetAgent\
 PHP_WINDOWS
 instance.out
 <INSTALLPATH>\APM Insight PHP Agent\zpa\bin
 PHP
 instance.out
 /opt/zpa/bin/
 NODEJS
 apminsight.json
 <application root directory>/apminsightdata

4. Restart the application server and the respective service. The service name varies for each agent, as listed below:

 Agent type
 Service name
 JAVA
 <application server>  

 (eg: Tomcat, JBoss, etc.) 
 RUBY
 <application> 
 DOTNET
 APM Insight .NET Agent Service (Windows)
 DOTNET_CORE
 <application server> or dotnet process
 PHP_WINDOWS
 APM Insight PHP Agent service
 PHP
 zpdpsvc
 NODEJS
 <application server> or npm process
PYTHON
 <application> 

In Serverless Set-up

In Containers and Kubernetes

  1. Rebuild the image in Environment variables or the apminsight.conf file with the new device key.  
  2. Delete the existing information files (if found) under volume mapping.
  3. Stop the existing containers and spawn new ones with the updated image. 

In Elastic Beanstalk

  1. Device key set in .ebextension file
    1. Update the device key present in the .ebextension or apminsight.config file.
    2. Add a command to delete the existing instance information files (refer to above for locations).
    3. Re-deploy the application with the new .ebextension or apminsight.config file
  1. Device key set in EBS environment variable
    1. Update the EBS device key from the EBS console by editing the S247_LICENSE_KEY variable.
    2. Add a command to the .ebextension or apminsight.config file to delete existing instance information files (refer to above for locations).
    3. Re-deploy the application with the new .ebextension or apminsight.config file. 

In Azure VM Extension or App Service Extension (.NET & .NET Core)

  1. Uninstall the existing extension.
  2. Reinstall the extension with the updated device key.

Azure Web Apps (Java)

  1. Navigate to the agent extracted directory, usually located in APP_HOME/WEB-INF/lib/site24x7.
  2. Update the device key present in the apminsight.config file.
  3. Delete the apminsight.info file present in the same directory.
  4. Restart the Azure Web App

Kubernetes postStart lifecycle (PHP)

  1. Change the apikey parameter for the installation script in the Kubernetes postStart lifecycle event or the values.yaml file in Helm charts.
  2. Re-deploy your application/service. 


    • Related Articles

    • DC migration steps for APM Insight Node.js agent

      Obtain the new device key. Update the licenseKey value in the apminsighnode.json file located at the <application root directory>. Log in to the server and delete the existing instance information file apminsight.json located at <application root ...
    • DC migration steps for APM Insight Ruby agent

      Obtain the new device key. Update the license.key value in the apminsight.conf file located at <APP_HOME>/. Log in to the server and delete the existing instance information file, apminsight.info, located at <APP_HOME>/. Restart the Ruby application. ...
    • DC migration steps for APM Insight Java agent

      Obtain the new device key. Update the license.key value in the apminsight.conf file located at <apminsight-javaagent.zip Extracted Directory>/. Log in to the server and delete the existing instance information file apminsight.info located at ...
    • DC migration steps for APM Insight Python agent

      Obtain the new device key. Update the license.key value in the apminsight_info.json file located at the <application root directory>. Log in to the server and delete the existing instance information file located at the <application root ...
    • DC migration steps for APM Insight PHP agent

      PHP Windows agent Obtain the new device key. Update the license.key value in the apminsight.conf file located at <INSTALLPATH>\APM Insight PHP Agent\zpa\bin. Log in to the server and delete the existing instance information file instance.out located ...