Backup and Restore .NET Agent Configuration


In general, the APM Insight .NET agent can be installed in multiple load balanced servers. The same agent configurations like standalone app filters, Windows service apps filters, and more can be applied across all servers to replicate the same configurations.

But if you have hundreds of servers, it may be difficult to replicate the same configuration for each server. In these cases, you can take the backup configuration from one server and restore it in rest of the servers using the APM Insight Health Monitor tool.

Backup of configurations

To take a backup of configuration via application, follow the steps given below:

  1. Open the Health Monitor tool, and navigate to the Tools tab.

  2. Click on Back Up Configuration and a file named DotNetAgentConfigBackUp.zip will be created in the desired location.
  3. The Backup file will contains the configurations of the dotnetAgent and it will be used to restore the configuration to the multiple servers.

Restore of configurations

The configuration file can be restored in two ways:

Restore via application

Note: Make sure to install the latest version of .NET agent before proceeding.

  1. Copy the DotNetAgentConfigBackUp.zip file to the new server location where it is to be installed.
  2. Open the Health monitor tool, and navigate to Tools tab.

  3. Click Restore Configuration and load the DotNetAgentConfigBackUp.zip file. This will automatically restart the agent service.
  4. Restart the Windows Service and standalone apps manually to take full effect.

Restore via Command Line

In case if you have not installed the agent across your servers, you can install the agent and restore the configurations via command line. This eliminates the need to install the agent and then install the health monitor across all agents.

The installing agent will take the configurations automatically from the back up file and install with those defined configurations. We can also make a batch script to execute the same in hundreds of servers to reduce the agent configuration work in application servers.

  1. Copy the DotNetAgentConfigBackUp.zip file to the new server where the agent needs to be installed.
  2. Place the configuration backup file in the same location as the agent MSI.
  3. Use the below command to install the agent MSI while restoring the configurations.

    C:\> msiexec -i apminsight-dotnetagent.msi configbackupfile=DotNetAgentConfigBackUp.zip

  4. Restart the Windows Service and standalone apps manually to take full effect.