AppDynamics automatically detects HTTP backends, and names them by URL, including by their host, port, and path. If the default configuration results in names that are not meaningful for your application (such as EC2 host names, file paths, and ports in the name) you can change the default discovery rule, as described here.
About HTTP Backend Naming
To ensure that the HTTP backends detected in your application have meaningful names, your custom configuration will need to take into account the specific format in use in your environment. The format can vary, including within a single environment. For example, a backend hostname prefixed with ec2storage may not be meaningful, while one that uses salesforce.com may be.
To account for different formats, you should create a custom rule rather than changing the automatic discovery rule. This lets you apply different rules for different URL formats. For example:
- For format "ec2storage/servicename", you would use the URL
- For format "salesforce.com", use the host name
- For the other backends, you may use a query string
In some cases, your HTTP backend discovery configuration might consist of a combination of the default rule and custom rules. The following section walks you through a specific example.
Using the URL Path in a Detection Rule
For example, when all the HTTP backends for a tier or application have a similar format, such as a prefix like "ec2storage", you can generate the right name and the correct number of backends to monitor by editing the automatic discovery rule. Doing this enables you to monitor the key performance indicators (KPIs) that are of most interest to you.
Consider an application with the following HTTP URLs:
In this case, measuring performance based on host name wouldn't be useful, since the IP addresses are transient and all performance numbers would be irrelevant after the IP addresses recycle. Instead, you can monitor by service name by avoiding the use of Host and Port properties and using only the URL property, as follows:
- Edit the Automatic Backend Discovery rule for HTTP for your agent type. See Backend Detection Rules for details on accessing this screen.
- First select and disable the use of Host and Port.
- Then select and enable the property you want to use to uniquely identify the backend. In this case, select URL and check Use URL in the Backend Name.
- For the field How will URL be used in the Backend name?, select Use a segment of it.
From the segment options drop-down list, select Use the first N Segments.
The important URL segment is for the "create" service, so your configuration is the same as in the previous screen shot.
Enter "/" slash for the Split Delimeter.
Use a similar technique to strip out some segment of the URL, such as a user name as in the following URLs:
Once you change the configuration, delete all HTTP backends. When the agent rediscovers the backends with the new configuration, the flow map shows only the service backends.