AppDynamics Application Intelligence Platform

3.8.x Documentation

PDFs

Videos

Release Notes

AppDynamics Inc.

Skip to end of metadata
Go to start of metadata

You can export your transaction detection configurations from one application to another using the AppDynamics REST API. This capability allows you to re-use transaction detection configurations in different applications instead of re-configuring each application manually using the AppDynamics console. This functionality is available for all agent types, including application agents for Java, .NETPHP, and Node.js

You can export from an application or tier configuration and import to an application or tier configuration. 

You can import and export:

  • auto-detected entry point configurations
  • custom match rules
  • exclude rules

To export use the HTTP GET method. Encode the URI using UTF-8 URL encoding. The URI is the application (and optionally the tier) from which you are exporting the configuration. The configuration is exported to an xml file. If necessary, you can edit the xml file before you import it. For example, if you have exported the configuration of all the auto-detected entry-points and you do not want to import all of them, you can delete the ones you do not want from the file before you import it.

To import use the HTTP POST method. Encode the URI using UTF-8 URL encoding. The URI is the application (and optionally the tier) to which you are importing the configuration.

The URLs for both the import and export operations are identical. 
To import the rule to the destination controller, use an HTTP POST operation attaching the XML file that describes the rule as attachment.

To create the XML file do one of the following:


  • EASY: Create the rule on a local controller and export it. 

  • 
DIFFICULT: Write the XML for the rule from scratch using a text editor.

For information about overwriting a configuration with the same name see Overwrite Parameter.

Import and Export Auto-Detected Entry Point Configurations

You can import and export all your entry point configurations or one entry point configuration in a single request. Lists of multiple entry point names are not supported.

For requests that specify a single entry point configuration, the entry-point-type-name is the name displayed in the Type column of the Entry Points List in the Instrumentation->Transaction Detection tab in the AppDynamics console.

In the syntax examples in this section, <entry-point-type-name> can be defined as follows:

Entry Type<entry-point-type-name>
Servletservlet
Struts ActionstrutsAction
Web ServicewebService
POJO                                     pojo
Spring BeanspringBean
EJB                                        ejb
JMS                                       jms
Binary RemotingbinaryRemoting

To import or export the configurations for all the auto-detected entry-points to or from an application

http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/auto

For example:

http://op2.appdynamics.com:80/controller/transactiondetection/ACME Book Store Application/auto

produces the output in auto_app_all.xml.

To import or export the configuration for a single auto-detected entry point type to or from an application

http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/auto/<entry-point-type-name>

For example:

http://op2.appdynamics.com:80/controller/transactiondetection/ACME Book Store Application/auto/Servlet

produces the output in auto_app_servlet.xml.

To import or export the configurations for all the auto-detected entry-points to or from a tier

http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/<tier-name>/auto

For example:

http://op2.appdynamics.com:80/controller/transactiondetection/ACME Book Store Application/ECommerce Server/auto/

produces the output in auto_tier_all.xml.

To import or export the configuration for a single auto-detected entry point type to or from a tier

http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/<tier-name>/auto/<entry-point-type-name>

For example:

http://op2.appdynamics.com:80/controller/transactiondetection/ACME Book Store Application/ECommerce Server/auto/Servlet

produces the output in auto_tier_servlet.xml.

Import and Export Custom Match and Exclude Rules

The URLs for both the import and export operations are identical. 

To create the XML file do one of the following:

  • EASY: Create the rule on a local controller and export it. 

or

  • DIFFICULT: Write the XML for the rule from scratch using a text editor.

To import the rule to the destination controller, use an HTTP POST operation attaching the XML file that describes the rule as attachment.

To import or export a single custom match rule to or from an application

http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/custom/<entry-point-type-name>/<custom-rule-name>

For example:

http://op2.appdynamics.com/controller/transactiondetection/ACME Book Store Application/custom/pojo/JavaTimer

produces the output in custom_app_single.xml.

The older syntax -
http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/<entry-point-type-name>/custom/<custom-rule-name>
has been deprecated but it still works for backward compatibility with existing queries.

To import or export a single custom match rule to or from a tier

http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/<tier-name>/custom/<entry-point-type-name>/<custom-rule-name>

For example:

http://op2.appdynamics.com:80/controller/transactiondetection/ACME Book Store Application/ECommerce Server/custom/pojo/Quartz

produces the output in custom_tier_single.xml.

The older syntax -
http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/<tier-name>/<entry-point-type-name>/custom/<custom-rule-name>
has been deprecated but it still works for backward compatibility with existing queries.

Import and Export Exclude Rules

You can import and export exclude rules for servlet and POJO type entry points.

The exclude-rule-name is the name displayed in the exclude rule list in the Instrumentation->Transaction Detection tab in the AppDynamics console.

To import or export a single exclude rule to or from an application

http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/exclude/<entry-point-type-name>/<exclude-rule-name>

For example:

http://op2.appdynamics.com:80/controller/transactiondetection/ACME Book Store Application/exclude/servlet/Apache Axis Servlet

produces the output in exclude_app_single.

To import or export a single exclude rule to or from a tier

http://<controller-host>:<controller-port>/controller/transactiondetection/<application-name>/<tier-name>/exclude/<entry-point-type-name>/<exclude-rule-name>

For example:

http://op2.appdynamics.com:80/controller/transactiondetection/ACME Book Store Application/ECommerce Server/exclude/servlet/Struts Action Servlet

produces the output in exclude_tier_single.

Overwrite Parameter

Use the overwrite parameter to overwrite a configuration of the same name. Without this parameter, if the import encounters a configuration for a component of the same name, the request will fail.

For example, to import a configuration for a POJO custom match rule named "JavaTimer" to an application that has an existing "JavaTimer" custom match rule use:

http://op2.appdynamics.com:80/controller/transactiondetection/ACME Book Store Application/pojo/custom/JavaTimer?overwrite=true

The default is overwrite=false.

Learn More

2 Comments

  1. We could use some more specific info on how to do the import. I learned a HTTP form POST is required with a "file" field:

    curl --basic --url "https://localhost/controller/transactiondetection/myapp/my%20tier/custom" -F file=@rules.xml -u fgonzales@appdynamics -v

    I also don't understand the comment about not replacing spaces with %20. I find I have to do that when using curl to get both the export and import to work.

    1. Unknown User (ldavidson@appdynamics.com)

      Deleted "; for example, do not replace a space (" ") with "%20" in the URI." That was a mistake.

      If you are using UTF-8 URL Encoding it should work.