ManageEngine® Applications Manager APM Insight Agent Configuration Options | ||
This page should help you tune the configuration for tracking web based transactions. These settings can be configured in apminsight.conf file. Make sure that this file is present in the folder where you have deployed the APM Insight agent.
To configure settings for background transactions, go to Tracking Background Transactions
To custom instrument classes of your choice, go to Custom Instrumentation
To merge similar transactions, go to Group Similar Transactions
The following table explains all the configurations:
Configuration |
Description |
Default Value |
|
application.name* |
Example: myonlineshopping.com
|
My Application |
|
apm.host* |
Example: mymachine.mydomain.com |
|
|
apm.protocol.https |
|
false |
|
apm.port* |
Example: 9090 |
|
|
behind.proxy |
|
false |
|
agent.server.port* |
|
||
apdex.threshold |
|
0.5 (Second) |
|
sql.capture.enabled |
|
true |
|
transaction.trace.enabled |
|
true |
|
transaction.trace.threshold |
|
2 (Seconds) |
|
transaction.trace.sql.parametrize |
|
true |
|
transaction.trace.sql.stacktrace.threshold |
|
3 (Second) |
|
webtransaction.trace.input.params.record |
|
false |
|
webtransaction.trace.input.params.ignore |
|
password, authKey |
|
webtransaction.naming.use.requesturl |
|
||
webtransaction.encoding.charset |
|
||
transaction.skip.listening |
|
*.css, *.js, *.gif, *.jpg, *.jpeg, *.bmp, *.png |
|
transaction.tracking.request.interval |
|
1 (request) |
|
include.components |
Note: The specified package names, by default will be included for instrumentation and you need not repeat this in custom_instrumentation.conf |
|
|
apminsight.log.dir |
|
||
apminsight.log.level |
|
INFO (level) |
|
autoupgrade.enabled |
|
false |
APM Insight will use its default factory value, if any invalid value specified for an option. Other than options listed below, all the other options can be changed at run time.
application.name
apm.host
apm.port
agent.server.port
apminsight.log.dir
apminsight.log.level (only in java agent. Whereas, in .NET agent, this property can be changed at run time)
Note |
Apart from web transactions, most applications run background tasks to perform various tasks like maintenance, schedulers, messaging, etc. APM Insight also captures these transactions and list them under Background tab in APM Insight dashboard.
Note: This feature is available in .Net & Java agents only |
For the agent to track background transactions, it has to be enabled in background_transaction.conf file. Configuration for background transactions is explained below.
Configuration | Description | Default Value |
bgtransaction.tracking.enabled |
|
true |
bgtransaction.trace.enabled |
|
true |
bgtransaction.trace.threshold |
|
5 (seconds) |
bgtransaction.tracking.request.interval |
|
1 (request) for Java & 5 for .Net agent |
Note:
|
APM Insight agent instruments predefined classes of several Web Components and Frameworks to provide insight into the application. APM Insight also provides an option to custom instrument, classes of your choice. Custom instrumentation helps in providing wider insight into applications, where it will be easier to track performance of specific features or modules in the application.
Java Agent provides two ways to custom instrument your application:
1. Using Configuration File
To instrument classes of your choice, specify the class name in 'custom_instrumentation.conf' file, as per format specified below.
Fully/qualified/ClassName : Methods to be instrumented
Use comma(,) as method separator for multiple entries. If methods to be instrumented is left blank, all methods under the specified class will be instrumented. If there exists, overloading methods that needs to be instrumented, all the overloaded methods will be instrumented. Each class entry must be given in a new line.
Example:
a/b/c/CustomClass : methodA, methodB
a/b/c/CustomClass :
If all classes in a package needs to be instrumented, specify the package name as described below.
package_name/.* :
Example: a/b/c/.* :
It is not recommended to specify packages as input, as the agent will instrument all methods in all classes and all packages under it. These may cost extra overhead in CPU and memory usage. Also, there will be many methods that are of least interest and also these makes the traces lengthy. Although it can be used to study the code flow.
Note: It requires a application server restart for the changes to be effective |
2. Using JAVA Annotations
Using Java annotations, APM Insight provides an easier way to custom instrument your application classes and methods. Usage of Java annotation enables you to define custom names for the transaction and also assign a custom component.
Note: This feature is available from agent version 2.2
Pre-requisites
Download the apminsight-javaagent.zip file which includes agent jar with its associated files along with the apminsight-javaagent-api.jar
Include the apminsight-javaagent-api.jar file to the project build path. Make sure the jar file is exported along with the application's libraries.
There are two annotations that can be used to custom instrument:
ApmTracker - Can be used upon any classes and methods, which will be instrumented and included in the traces.
ApmRootTracker - Can be used upon the methods which are likely to be starting point of transaction execution.
This annotation can be used on Classes and Methods. When used upon a class, the attributes are applied for all the methods in that class. It will override the method-wise annotations.
Attributes:
component- Default Value: POJO (Plain Java Object) |
Defines a component name for the annotated element. Its an optional attribute.
Example:
Case 1: Usage on Class |
Case 2: @ApmTracker(component="payment") public class PaymentProcessor { ... } |
Case 3: Usage on Methods |
This annotation can be used only on methods. If annotated method is the first method invoked on the server for processing the transaction, then the transaction is re-named using the value of the txnName attribute. Else, it is considered to be a normal method call and included in the traces.
Attributes:
txnName - Mandatory attribute. |
Value of this attribute is used to name the transaction that invoked the ApmRootTracker annotated method.
component - Default Value: POJO |
Defines a component name for the annotated element. Its an optional attribute.
Example:
public class AppService { @ApmRootTracker(txnName="Service-Initialisation") public void init() { ... } } |
Dynamic Transaction names are becoming more familiar with lots of applications, making it difficult to actually track the performance of the application. Dynamic transactions are web transactions within an application having single URL but get appended with unique alpha numeric identifiers every time they are invoked, making the web transaction name itself look different. Tracking such individual URLs is a herculean task. Here, this feature of grouping similar transactions, will help to group these dynamic transactions into the actual URL that needs to be monitored.
Configuration Steps for .Net Agent
Open Edit configuration UI, select Transactions Merge tab and add the transaction patterns you want to merge (illustrated in manual step 3.).
To do it manually do the following steps:
Go to the APM Insight .NET Agent installation folder after installing the agent.
Open DotNetAgent folder.
Open transaction_merge_patterns.conf and add the patterns as mentioned in the below sample,
aspsite/account/~=account - The above pattern will match with all transactions which start with aspsite/account/ and it will be renamed as account.
aspsite/~/basicdetails=basicdetails - The above pattern will match with all transactions which start with aspsite/ and end with /basicdetails. They will be renamed as basicdetails.
~/educationdetails=educationdetails - The above pattern will match with all transactions which end with /educationdetails and it will be renamed as educationdetails.
Copy this transaction_merge_patterns.conf file and paste it in the following location.
%WINDIR%\ProgramData\DotnetAgent (for 64-bit agent) - For Windows server 2003, the corresponding path will be in %WINDIR%\Documents and Settings\All Users\Application Data\DotNetAgent
%WINDIR%\ProgramData\DotnetAgent (for 32-bit agent) - For Windows server 2003, the corresponding path will be in %WINDIR%\Documents and Settings\All Users\Application Data\DotNetAgent
In case of multi-monitors, all sub folders for every application in the above locations.
We can add, remove or comment the patterns at any point of time in the configuration file.
Note: Service restart is not required to take effect of this configuration change. The changes will be affected in the next minute onwards. |
Configuration Steps for Java Agent
Shutdown the Application Server to which the agent is plugged in.
Create a new file named "transaction_merge_patterns.conf" in the directory where the apminsight.conf exists.
Open the file in a text editor and specify key value pairs as per below syntax.
Regular expression of URLs/web transaction=new name to be assigned.
Start the Application Server, all transactions performed from now, will use the above defined patterns to merge the transactions
Example:
You have Web transaction URLs:
ebay/shop/user/4534634
ebay/shop/user/1380284
ebay/shop/0278734/chocolate/orion
ebay/shop/0278734/chocolate/snickers
ebay/shop/3847553/stationary/pencil
ebay/shop/9734944/stationary/pen
How to specify in transaction_merge_patterns.conf
ebay/shop/.*/chocolate/.*=ebay/shop/chocolate
ebay/shop/.*/stationary/.*=ebay/shop/stationary
ebay/shop/user/.*=ebay/shop/users
Configuration Steps for Ruby Agent
Create a new file named "transaction_merge_patterns.conf" in the directory where apminsight.conf file resides in your application.
Open the file in any text editor and specify key value pairs as per syntax given below
Regular expression of URLs=new_name_to_be_assigned
Start or restart the rails server, all transactions performed from now, will use the above defined patterns to merge the transactions
Example:
ruby/shop/item/laptops/.*=shop/laptops
ruby/shop/item/.*/dell/.*=shop/item/dell
.*/cart/purchase=shop/purchase
APM Insight .NET Agent |
APM Insight Dashboard |