Highly-scaled environments frequently contain multiple machines that run the same .NET applications and therefore use the same AppDynamics .NET Agent configuration. Manual configuration updates to several machines can be tedious and error-prone.
Use the Config Management tool in the AppDynamics Controller to upload and manage .NET Agent config.xml files. By default the .NET Agent checks for configuration updates from the controller every minute. Use the Config Management tool assign configurations to machines where the .NET Agent is running.
Click Settings > AppDynamics Agents > Config Management to manage all the .NET Agent configurations files for your machines.
- Membership in a role with "Administer user, groups, roles, authentication, etc." account level permission.
- A valid config.xml configuration file. The Config Management tool doesn't validate the config.xml.
- .NET Agent 4.1 or later installed on machines where you plan to deploy configuration.
.NET agents deployed on Azure cloud services using the AppDynamics NuGet package do not register for Config Management because web role and worker role machine names are not always unique. Duplicate machine names could lead to unexpected consequences.
Identify Configuration File
To start managing your configurations in the Controller, identify a configuration file or set of configuration files to upload. If you're not familiar with .NET Agent configuration, AppDynamics recommends you use the Agent Configuration Utility on each machine to configure the agent. For more information, see Administer the .NET Agent and Configure the .NET Agent.
For a full list of configuration properties, see .NET Agent Configuration Properties.
- Use config.xml files configured with the AppDynamics Agent Configuration Utility to help ensure the XML is valid.
- Use config.xml from a previously-configured machine as a template for similar machines that need the exact same configuration.
The Import Config dialog lets you upload a config.xml file to the Controller and specify a unique name for the configuration.
- Use a naming convention that helps you easily identify the type of machine for the configuration.
- Consider using a date or version scheme for the configuration name.
- Click a config then click Edit Config to modify the config name.
- Double-click a config to display the XML. You can copy the XML, but you cannot modify it.
Assign Configuration to Machines
The Config Management tool lets you assign machines to a configuration or change the configuration from one to another. After you assign the configuration in the Controller the .NET Agent automatically downloads the configuration file.
If a machine doesn't currently have a managed configuration, the Config Management tool displays it beneath Machine with no assigned templates.
If you choose the Register Machine with No Application on the Application Configuration window in the AppDynamics Agent Configuration utility, the Controller lists the machine in Machine with no assigned templates.
- Drag and drop to assign a machine to a configuration.
- The .NET Agent checks for updated configurations every minute.
- The agent backs up the old config.xml file as
config-<date>.xmlin the Backup subdirectory of the Config directory. See .NET Agent Directory Structure.
- If the agent detects an invalid config.xml, it does not apply the managed configuration and it raises an Agent Configuration Error event in the Controller. The event summary indicates the affected tiers and nodes.
- Regardless of the Controller connection information in the managed configuration, the agent always retains existing Controller connection information.
- After the agent receives and validates the assigned configuration, any changes take effect after the app pools recycle or IIS restarts. You must restart Windows services or standalone applications. It is unnecessary to restart the AppDynamics Agent Coordinator service.
Opt Out of Config Management
To configure an agent so that it does not receive configuration files from the Controller, set the Controller enable config deployment attribute to false in the config xml. See "Controller Element' on .NET Agent Configuration Properties. For example:
Restore an Old Configuration
If you mistakenly assign a configuration use the following steps to restore a previous version of the config.xml:
- On the Config Management window, drag the machine from its currently assigned config to Machine with no assigned templates.
- On the machine itself, rename the config.xml.
- Copy the backup config file from the Backup subdirectory to the Config directory. Backup files are named as follows:
- Rename the backup config file to config.xml.
- Optionally edit the config.xml to opt out of Config Management.
- Restart the AppDynamics Agent Coordinator service.
- Restart Windows services, instrumented Windows services, and instrumented standalone applications.