| Report | What it shows | Function |
|---|---|---|
| Errors per application | 4xx and 5xx error counts for each application | apm_app_error_split |
| Top error transactions | The transactions causing the most errors | apm_txn_error_split |
| Transaction health | How many transactions are Critical or Clear | apm_txn_health |
| SLA breaches | How many transactions are slower than 2 s, 4 s or 10 s | apm_txn_sla |
| SLA breached transactions | Which transactions are slower than your limit | apm_txn_sla_breaches |
InstallAPMInsightReportFunctions.bat into <APM home>\bin. Example: D:\tools\APM\AppManager\binInstallAPMInsightReportFunctions.batInstall on every AppManager server whose data you want to report on. Running it again is safe.
Run reports from the Query Tool, or save them as a Custom Query Report (see Save, schedule or monitor below). Each report is one line:
SELECT * FROM apm_txn_health('30m')The first value is how far back to look. Write a number followed by a unit, in single quotes.
| Unit | Letter | Example | Means |
|---|---|---|---|
| Seconds | s | '90s' | last 90 seconds |
| Minutes | m | '30m' | last 30 minutes default |
| Hours | h | '2h' | last 2 hours |
| Days | d | '7d' | last 7 days |
| Weeks | w | '2w' | last 2 weeks |
'45' is the last 45 minutes.'1.5h' is the last 90 minutes.Reports cover all applications by default. To report on specific ones, add their IDs at the end:
SELECT * FROM apm_app_error_split('1d', ARRAY[10000364])To list your application IDs:
SELECT DISTINCT p.applicationid, mo.displayname FROM apm_partitioninfo p JOIN am_managedobject mo ON mo.resourceid = p.applicationid ORDER BY 2| applicationid | displayname |
|---|---|
| 10000364 | Ecommerce App |
Example result.
The number of 4xx and 5xx errors for each application.
SELECT * FROM apm_app_error_split('30m')| Column | Meaning |
|---|---|
applicationid | Application ID |
displayname | Application name |
count_4xx | 4xx Client errors, such as a bad request or page not found |
count_5xx | 5xx Server errors |
total_errors | Both together |
| applicationid | displayname | count_4xx | count_5xx | total_errors |
|---|---|---|---|---|
| 10000364 | Ecommerce App | 2 | 0 | 2 |
Example: Ecommerce App had two 4xx errors and no 5xx errors.
The transactions with the most 4xx and 5xx errors, per application. The second value is how many to show.
SELECT * FROM apm_txn_error_split('30m', 10)| Column | Meaning |
|---|---|
applicationid, displayname | The application |
transactionid | Transaction ID |
transactionname | The transaction, for example a URL |
txn_type | Transaction type, such as HTTP |
iskeytxn | 1 if it's a business transaction |
count_4xx, count_5xx | Its 4xx and 5xx errors |
total_errors | Both together |
| applicationid | displayname | transactionid | transactionname | txn_type | iskeytxn | count_4xx | count_5xx | total_errors |
|---|---|---|---|---|---|---|---|---|
| 10000364 | Ecommerce App | 10000062 | /checkout/payment | HTTP | 0 | 2 | 0 | 2 |
Example: one transaction, /checkout/payment, returned two 4xx errors.
Shows how many transactions are Critical and how many are Clear. A transaction is Critical when it's slow or has too many errors.
SELECT * FROM apm_txn_health('30m')Add settings in this order, separated by commas. You can stop after any of them; the rest keep their defaults.
| # | Setting | Default | Example |
|---|---|---|---|
| 1 | Time period | '30m' | '1d' |
| 2 | Slow from this response time, in milliseconds | 500 | 2000 = 2 seconds |
| 3 | Too many errors from this error % | 1 | 5 |
| 4 | Critical when | 'or' | see below |
| 5 | Business transactions only | false | true |
| 6 | Applications | all | ARRAY[10000364] |
Setting 4 decides which checks count:
| Value | Meaning |
|---|---|
'or' | Critical if slow or too many errors |
'and' | Critical only if slow and too many errors |
'rt' | Critical if slow; errors are ignored |
'err' | Critical if too many errors; response time is ignored |
Slower than 2 seconds, or more than 5% errors
SELECT * FROM apm_txn_health('30m', 2000, 5)Slower than 2 seconds, ignoring errors
SELECT * FROM apm_txn_health('30m', 2000, 1, 'rt')With 'rt' the error value (1 here) is ignored, but it still has to be there.
Business transactions only, default limits
SELECT * FROM apm_txn_health('30m', 500, 1, 'or', true)| applicationid | displayname | critical | clear | total |
|---|---|---|---|---|
| 10000364 | Ecommerce App | 9 | 110 | 119 |
Example: 119 transactions had traffic in the time period. 9 were Critical and 110 Clear.
Shows how many transactions are slower than each limit you give.
SELECT * FROM apm_txn_sla('30m', ARRAY[2000,4000,10000])| # | Setting | Default |
|---|---|---|
| 1 | Time period | '30m' |
| 2 | Limits, in milliseconds | ARRAY[2000,4000,10000] (2 s, 4 s and 10 s) |
| 3 | Business transactions only | false |
| 4 | Applications | all |
| applicationid | displayname | threshold_ms | breached | total | breach_pct |
|---|---|---|---|---|---|
| 10000364 | Ecommerce App | 2000 | 1 | 119 | 0.84 |
| 10000364 | Ecommerce App | 4000 | 1 | 119 | 0.84 |
| 10000364 | Ecommerce App | 10000 | 1 | 119 | 0.84 |
Example: one row per limit. 1 of 119 transactions was slower than 2 s, and the same one was slower than 10 s.
Lists the transactions that are slower than a response-time limit, slowest first.
SELECT * FROM apm_txn_sla_breaches('30m', 2000)| # | Setting | Default |
|---|---|---|
| 1 | Time period | '30m' |
| 2 | Limit, in milliseconds | 2000 (2 seconds) |
| 3 | Business transactions only | false |
| 4 | Applications | all |
| Column | Meaning |
|---|---|
applicationid, displayname | The application |
transactionid | Transaction ID |
transactionname | The transaction, for example a URL |
txn_type | Transaction type, such as HTTP |
iskeytxn | 1 if it's a business transaction |
avg_response_ms | Average response time in the time period, in milliseconds |
requests | Number of requests in the time period |
| applicationid | displayname | transactionid | transactionname | txn_type | iskeytxn | avg_response_ms | requests |
|---|---|---|---|---|---|---|---|
| 10000364 | Ecommerce App | 10000087 | /orders/export | HTTP | 0 | 12480 | 36 |
Example: one transaction averaged about 12.5 seconds over 36 requests.
| Field | What to enter |
|---|---|
| Report Name | A name, for example Transaction health, last 30 minutes |
| Description | What the report shows |
| Query | One of the queries on this page |
| Execute query on | On an Admin Server only: Choose the Managed Servers to run it on Note: APMInsight Raw data resides only in Managed Servers |
Scheduled reports are sent by email.
Add a Database Query Monitor for the AppManager PostgreSQL database and use the same query. The results are then collected on every poll.
More details: Custom Query Report help
'7d'.Open the database console from <APM home>\bin:
DBConfiguration.bat -u dbuserThen paste:
DROP FUNCTION IF EXISTS apm_txn_health(integer, bigint, numeric, text, boolean, bigint[]);
DROP FUNCTION IF EXISTS apm_txn_error_split(integer, integer, bigint[]);
DROP FUNCTION IF EXISTS apm_app_error_split(integer, bigint[]);
DROP FUNCTION IF EXISTS apm_txn_sla_breaches(text, bigint, boolean, bigint[]);
DROP FUNCTION IF EXISTS apm_txn_sla(text, bigint[], boolean, bigint[]);
DROP FUNCTION IF EXISTS apm_txn_health(text, bigint, numeric, text, boolean, bigint[]);
DROP FUNCTION IF EXISTS apm_txn_error_split(text, integer, bigint[]);
DROP FUNCTION IF EXISTS apm_app_error_split(text, bigint[]);
DROP FUNCTION IF EXISTS apm_union_err(bigint, bigint[], boolean);
DROP FUNCTION IF EXISTS apm_union_txn(bigint, bigint[]);
DROP FUNCTION IF EXISTS apm_window_ms(text);