A background task is a processing activity such as an administrative task or internal process that you want to monitor separately from primary business transactions, such as a cron job that backs up a server.
While the process may be important to your environment, it is likely that you do not want to monitor them in the same way as primary business transactions. Background task performance metrics do not count toward the average response time of the tier or node.
During business transaction discovery, AppDynamics attempts to identify processes in the environment that are background tasks and classify them accordingly. You can modify the default configuration based on your requirements and manually change business transactions to background tasks, as described here.
Viewing Background Tasks
Although background tasks are monitored separately, they are displayed along with the other business transactions in the Business Transactions list. Background tasks are identified in the list by the background task icon ().
The following information is available on background tasks:
- The Business Transactions list shows currently executing background tasks and their statistics.
- The Metric Browser shows the response time for each background task.
- Transaction snapshots are generated for each execution of a background task. However, if a particular job runs frequently, the snapshot may not capture all details for each execution.
The tier and application-level metrics do not reflect background task activity. In addition, background tasks are not reflected on the application dashboard.
Reclassify a Business Transaction as a Background Task
You can reclassify any existing business transaction as a background task by right-clicking on it in the business transaction list and choosing the Set as Background Task option. Choosing Set as User Transaction turns a background task into a primary business transaction.
Enabling Automatic Discovery for Background Tasks
At transaction discovery, a transaction is categorized as a background task based on a setting in a custom match rule that matches the transaction.
AppDynamics includes preconfigured match rules for Java frameworks that are likely to be background tasks, including for JCronTab, JavaTimer, Cron4J and Quartz frameworks. The match rules are disabled by default.
You can enable the match rules, modify them, or create your own custom match rules to have matched transactions categorized as background transactions.
To enable background task detection configuration, from the application or custom tier level configuration, edit an existing match rule or create a new one. Enable the rule, and check the Background Task option to business transactions discovered by this rule categorized as background tasks.
Configuring Thresholds for Background Tasks
You can configure performance thresholds for background tasks separately from primary business transactions. From the Configuration > Slow Transaction Thresholds page, click the Background Tasks Thresholds tab to access settings specific for background tasks.
AppDynamics recommends that you configure a threshold that is suitable for the background task in your environment. Use static thresholds for slow and very slow background tasks, if they have infrequent load patterns such as once every night. This is because the dynamic moving average-based thresholds are more suitable for production load scenarios and will automatically classify a background process as slow or very slow.