[DOCS] Add APM rule parameter descriptions (#213186)

This commit is contained in:
Lisa Cawley 2025-03-11 16:55:21 -07:00 committed by GitHub
parent 82eea41ddf
commit 86ddd8cf3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 271 additions and 87 deletions

View file

@ -59287,27 +59287,30 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service name.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
windowSize:
type: number
example: 6
description: The window size
description: |
The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.
windowUnit:
type: string
description: The window size unit
description: |
The type of units for the time window. For example: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: The environment from APM
description: Filter the rule to apply to a specific environment.
anomalySeverityType:
type: string
description: The anomaly threshold value
description: |
The severity of anomalies that will generate alerts: critical, major, minor, or warning.
enum:
- critical
- major
@ -59322,24 +59325,26 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the errors coming from your application to apply the rule to a specific service.
windowSize:
type: number
description: The window size
description: |
The time frame in which the errors must occur (in `windowUnit` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: The window size unit
description: |
The type of units for the time window: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: The environment from APM
description: Filter the errors coming from your application to apply the rule to a specific environment.
threshold:
type: number
description: The error count threshold value
description: The error count threshold.
groupBy:
type: array
default:
@ -59353,8 +59358,12 @@ components:
- service.environment
- transaction.name
- error.grouping_key
description: |
Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.
errorGroupingKey:
type: string
description: |
Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.
params_property_apm_transaction_duration:
required:
- windowSize
@ -59365,29 +59374,32 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
transactionName:
type: string
description: The transaction name from APM
description: Filter the rule to apply to a specific transaction name.
windowSize:
type: number
description: The window size
description: |
The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: ç
description: |
The type of units for the time window. For example: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: Filter the rule to apply to a specific environment.
threshold:
type: number
description: The latency threshold value
description: The latency threshold value.
groupBy:
type: array
default:
@ -59402,12 +59414,15 @@ components:
- service.environment
- transaction.type
- transaction.name
description: |
Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.
aggregationType:
type: string
enum:
- avg
- 95th
- 99th
description: The type of aggregation to perform.
params_property_apm_transaction_error_rate:
required:
- windowSize

View file

@ -66672,27 +66672,30 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service name.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
windowSize:
type: number
example: 6
description: The window size
description: |
The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.
windowUnit:
type: string
description: The window size unit
description: |
The type of units for the time window. For example: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: The environment from APM
description: Filter the rule to apply to a specific environment.
anomalySeverityType:
type: string
description: The anomaly threshold value
description: |
The severity of anomalies that will generate alerts: critical, major, minor, or warning.
enum:
- critical
- major
@ -66707,24 +66710,26 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the errors coming from your application to apply the rule to a specific service.
windowSize:
type: number
description: The window size
description: |
The time frame in which the errors must occur (in `windowUnit` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: The window size unit
description: |
The type of units for the time window: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: The environment from APM
description: Filter the errors coming from your application to apply the rule to a specific environment.
threshold:
type: number
description: The error count threshold value
description: The error count threshold.
groupBy:
type: array
default:
@ -66738,8 +66743,12 @@ components:
- service.environment
- transaction.name
- error.grouping_key
description: |
Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.
errorGroupingKey:
type: string
description: |
Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.
params_property_apm_transaction_duration:
required:
- windowSize
@ -66750,29 +66759,32 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
transactionName:
type: string
description: The transaction name from APM
description: Filter the rule to apply to a specific transaction name.
windowSize:
type: number
description: The window size
description: |
The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: ç
description: |
The type of units for the time window. For example: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: Filter the rule to apply to a specific environment.
threshold:
type: number
description: The latency threshold value
description: The latency threshold value.
groupBy:
type: array
default:
@ -66787,12 +66799,15 @@ components:
- service.environment
- transaction.type
- transaction.name
description: |
Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.
aggregationType:
type: string
enum:
- avg
- 95th
- 99th
description: The type of aggregation to perform.
params_property_apm_transaction_error_rate:
required:
- windowSize

View file

@ -24,18 +24,43 @@ const detectorsSchema = schema.oneOf([
]);
export const anomalyParamsSchema = schema.object({
serviceName: schema.maybe(schema.string()),
transactionType: schema.maybe(schema.string()),
windowSize: schema.number(),
windowUnit: schema.string(),
environment: schema.string(),
anomalySeverityType: schema.oneOf([
schema.literal(ML_ANOMALY_SEVERITY.CRITICAL),
schema.literal(ML_ANOMALY_SEVERITY.MAJOR),
schema.literal(ML_ANOMALY_SEVERITY.MINOR),
schema.literal(ML_ANOMALY_SEVERITY.WARNING),
]),
anomalyDetectorTypes: schema.maybe(schema.arrayOf(detectorsSchema, { minSize: 1 })),
serviceName: schema.maybe(schema.string({ meta: { description: 'The service name from APM.' } })),
transactionType: schema.maybe(
schema.string({ meta: { description: 'The transaction type from APM.' } })
),
windowSize: schema.number({
meta: {
description:
'The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.',
},
}),
windowUnit: schema.string({
meta: { description: 'The type of units for the time window: minutes, hours, or days.' },
}),
environment: schema.string({ meta: { description: 'The environment from APM.' } }),
anomalySeverityType: schema.oneOf(
[
schema.literal(ML_ANOMALY_SEVERITY.CRITICAL),
schema.literal(ML_ANOMALY_SEVERITY.MAJOR),
schema.literal(ML_ANOMALY_SEVERITY.MINOR),
schema.literal(ML_ANOMALY_SEVERITY.WARNING),
],
{
meta: {
description:
'The severity of anomalies that result in an alert: critical, major, minor, or warning.',
},
}
),
anomalyDetectorTypes: schema.maybe(
schema.arrayOf(detectorsSchema, {
minSize: 1,
meta: {
description:
'The types of anomalies that are detected. For example, detect abnormal latency, throughput, or failed transaction rates.',
},
})
),
});
export type AnomalyRuleParams = TypeOf<typeof anomalyParamsSchema>;

View file

@ -12,14 +12,57 @@ import { schema } from '@kbn/config-schema';
import { searchConfigurationSchema } from '../common/search_configuration_schema';
export const errorCountParamsSchema = schema.object({
windowSize: schema.number(),
windowUnit: schema.string(),
threshold: schema.number(),
serviceName: schema.maybe(schema.string()),
environment: schema.string(),
groupBy: schema.maybe(schema.arrayOf(schema.string())),
errorGroupingKey: schema.maybe(schema.string()),
useKqlFilter: schema.maybe(schema.boolean()),
windowSize: schema.number({
meta: {
description:
'The time frame in which the errors must occur (in `windowUnit` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.',
},
}),
windowUnit: schema.string({
meta: { description: 'The type of units for the time window: minutes, hours, or days.' },
}),
threshold: schema.number({
meta: { description: 'The number of errors, which is the threshold for alerts.' },
}),
serviceName: schema.maybe(
schema.string({
meta: {
description:
'Filter the errors coming from your application to apply the rule to a specific service.',
},
})
),
environment: schema.string({
meta: {
description:
'Filter the errors coming from your application to apply the rule to a specific environment.',
},
}),
groupBy: schema.maybe(
schema.arrayOf(
schema.string({
meta: {
description:
'Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.',
},
})
)
),
errorGroupingKey: schema.maybe(
schema.string({
meta: {
description:
'Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.',
},
})
),
useKqlFilter: schema.maybe(
schema.boolean({
meta: {
description: 'A filter in Kibana Query Language (KQL) that limits the scope of the rule.',
},
})
),
searchConfiguration: schema.maybe(searchConfigurationSchema),
});

View file

@ -18,20 +18,59 @@ export enum AggregationType {
}
export const transactionDurationParamsSchema = schema.object({
serviceName: schema.maybe(schema.string()),
transactionType: schema.maybe(schema.string()),
transactionName: schema.maybe(schema.string()),
windowSize: schema.number(),
windowUnit: schema.string(),
threshold: schema.number(),
aggregationType: schema.oneOf([
schema.literal(AggregationType.Avg),
schema.literal(AggregationType.P95),
schema.literal(AggregationType.P99),
]),
environment: schema.string(),
groupBy: schema.maybe(schema.arrayOf(schema.string())),
useKqlFilter: schema.maybe(schema.boolean()),
serviceName: schema.maybe(
schema.string({ meta: { description: 'Filter the rule to apply to a specific service.' } })
),
transactionType: schema.maybe(
schema.string({
meta: { description: 'Filter the rule to apply to a specific transaction type.' },
})
),
transactionName: schema.maybe(
schema.string({
meta: { description: 'Filter the rule to apply to a specific transaction name.' },
})
),
windowSize: schema.number({
meta: {
description:
'The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.',
},
}),
windowUnit: schema.string({
meta: {
description: 'The type of units for the time window. For example: minutes, hours, or days.',
},
}),
threshold: schema.number({ meta: { description: 'The latency threshold value.' } }),
aggregationType: schema.oneOf(
[
schema.literal(AggregationType.Avg),
schema.literal(AggregationType.P95),
schema.literal(AggregationType.P99),
],
{ meta: { description: 'The type of aggregation to perform.' } }
),
environment: schema.string({
meta: { description: 'Filter the rule to apply to a specific environment.' },
}),
groupBy: schema.maybe(
schema.arrayOf(
schema.string({
meta: {
description:
'Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.',
},
})
)
),
useKqlFilter: schema.maybe(
schema.boolean({
meta: {
description: 'A Kibana Query Language (KQL) expression thats limits the scope of alerts.',
},
})
),
searchConfiguration: schema.maybe(searchConfigurationSchema),
});

View file

@ -1588,6 +1588,7 @@ Object {
"anomalyDetectorTypes": Object {
"flags": Object {
"default": [Function],
"description": "The types of anomalies that are detected. For example, detect abnormal latency, throughput, or failed transaction rates.",
"error": [Function],
"presence": "optional",
},
@ -1655,6 +1656,7 @@ Object {
},
"anomalySeverityType": Object {
"flags": Object {
"description": "The severity of anomalies that result in an alert: critical, major, minor, or warning.",
"error": [Function],
},
"matches": Array [
@ -1711,6 +1713,7 @@ Object {
},
"environment": Object {
"flags": Object {
"description": "The environment from APM.",
"error": [Function],
},
"rules": Array [
@ -1726,6 +1729,7 @@ Object {
"serviceName": Object {
"flags": Object {
"default": [Function],
"description": "The service name from APM.",
"error": [Function],
"presence": "optional",
},
@ -1747,6 +1751,7 @@ Object {
"transactionType": Object {
"flags": Object {
"default": [Function],
"description": "The transaction type from APM.",
"error": [Function],
"presence": "optional",
},
@ -1767,12 +1772,14 @@ Object {
},
"windowSize": Object {
"flags": Object {
"description": "The size of the time window (in \`windowUnit\` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.",
"error": [Function],
},
"type": "number",
},
"windowUnit": Object {
"flags": Object {
"description": "The type of units for the time window: minutes, hours, or days.",
"error": [Function],
},
"rules": Array [
@ -1802,6 +1809,7 @@ Object {
"keys": Object {
"environment": Object {
"flags": Object {
"description": "Filter the errors coming from your application to apply the rule to a specific environment.",
"error": [Function],
},
"rules": Array [
@ -1817,6 +1825,7 @@ Object {
"errorGroupingKey": Object {
"flags": Object {
"default": [Function],
"description": "Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.",
"error": [Function],
"presence": "optional",
},
@ -1844,6 +1853,7 @@ Object {
"items": Array [
Object {
"flags": Object {
"description": "Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.",
"error": [Function],
"presence": "optional",
},
@ -1978,6 +1988,7 @@ Object {
"serviceName": Object {
"flags": Object {
"default": [Function],
"description": "Filter the errors coming from your application to apply the rule to a specific service.",
"error": [Function],
"presence": "optional",
},
@ -1998,6 +2009,7 @@ Object {
},
"threshold": Object {
"flags": Object {
"description": "The number of errors, which is the threshold for alerts.",
"error": [Function],
},
"type": "number",
@ -2005,6 +2017,7 @@ Object {
"useKqlFilter": Object {
"flags": Object {
"default": [Function],
"description": "A filter in Kibana Query Language (KQL) that limits the scope of the rule.",
"error": [Function],
"presence": "optional",
},
@ -2017,12 +2030,14 @@ Object {
},
"windowSize": Object {
"flags": Object {
"description": "The time frame in which the errors must occur (in \`windowUnit\` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.",
"error": [Function],
},
"type": "number",
},
"windowUnit": Object {
"flags": Object {
"description": "The type of units for the time window: minutes, hours, or days.",
"error": [Function],
},
"rules": Array [
@ -2052,6 +2067,7 @@ Object {
"keys": Object {
"aggregationType": Object {
"flags": Object {
"description": "The type of aggregation to perform.",
"error": [Function],
},
"matches": Array [
@ -2096,6 +2112,7 @@ Object {
},
"environment": Object {
"flags": Object {
"description": "Filter the rule to apply to a specific environment.",
"error": [Function],
},
"rules": Array [
@ -2117,6 +2134,7 @@ Object {
"items": Array [
Object {
"flags": Object {
"description": "Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.",
"error": [Function],
"presence": "optional",
},
@ -2251,6 +2269,7 @@ Object {
"serviceName": Object {
"flags": Object {
"default": [Function],
"description": "Filter the rule to apply to a specific service.",
"error": [Function],
"presence": "optional",
},
@ -2271,6 +2290,7 @@ Object {
},
"threshold": Object {
"flags": Object {
"description": "The latency threshold value.",
"error": [Function],
},
"type": "number",
@ -2278,6 +2298,7 @@ Object {
"transactionName": Object {
"flags": Object {
"default": [Function],
"description": "Filter the rule to apply to a specific transaction name.",
"error": [Function],
"presence": "optional",
},
@ -2299,6 +2320,7 @@ Object {
"transactionType": Object {
"flags": Object {
"default": [Function],
"description": "Filter the rule to apply to a specific transaction type.",
"error": [Function],
"presence": "optional",
},
@ -2320,6 +2342,7 @@ Object {
"useKqlFilter": Object {
"flags": Object {
"default": [Function],
"description": "A Kibana Query Language (KQL) expression thats limits the scope of alerts.",
"error": [Function],
"presence": "optional",
},
@ -2332,12 +2355,14 @@ Object {
},
"windowSize": Object {
"flags": Object {
"description": "The size of the time window (in \`windowUnit\` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.",
"error": [Function],
},
"type": "number",
},
"windowUnit": Object {
"flags": Object {
"description": "The type of units for the time window. For example: minutes, hours, or days.",
"error": [Function],
},
"rules": Array [

View file

@ -9,27 +9,32 @@ required:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service name.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
windowSize:
type: number
example: 6
description: The window size
description: >
The size of the time window (in `windowUnit` units), which determines how far back to search for documents.
Generally it should be a value higher than the rule check interval to avoid gaps in detection.
windowUnit:
type: string
description: The window size unit
description: >
The type of units for the time window.
For example: minutes, hours, or days.
enum:
- "m"
- "h"
- "d"
environment:
type: string
description: The environment from APM
description: Filter the rule to apply to a specific environment.
anomalySeverityType:
type: string
description: The anomaly threshold value
description: >
The severity of anomalies that will generate alerts: critical, major, minor, or warning.
enum:
- critical
- major

View file

@ -8,24 +8,27 @@ required:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the errors coming from your application to apply the rule to a specific service.
windowSize:
type: number
description: The window size
description: >
The time frame in which the errors must occur (in `windowUnit` units).
Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: The window size unit
description: >
The type of units for the time window: minutes, hours, or days.
enum:
- "m"
- "h"
- "d"
environment:
type: string
description: The environment from APM
description: Filter the errors coming from your application to apply the rule to a specific environment.
threshold:
type: number
description: The error count threshold value
description: The error count threshold.
groupBy:
type: array
default: ["service.name", "service.environment"]
@ -37,5 +40,10 @@ properties:
- "service.environment"
- "transaction.name"
- "error.grouping_key"
description: >
Perform a composite aggregation against the selected fields.
When any of these groups match the selected rule conditions, an alert is triggered per group.
errorGroupingKey:
type: string
type: string
description: >
Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.

View file

@ -9,29 +9,34 @@ required:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
transactionName:
type: string
description: The transaction name from APM
description: Filter the rule to apply to a specific transaction name.
windowSize:
type: number
description: The window size
description: >
The size of the time window (in `windowUnit` units), which determines how far back to search for documents.
Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: ç
description: >
The type of units for the time window.
For example: minutes, hours, or days.
enum:
- "m"
- "h"
- "d"
environment:
type: string
description: Filter the rule to apply to a specific environment.
threshold:
type: number
description: The latency threshold value
description: The latency threshold value.
groupBy:
type: array
default: ["service.name", "service.environment", "transaction.type"]
@ -43,9 +48,13 @@ properties:
- "service.environment"
- "transaction.type"
- "transaction.name"
description: >
Perform a composite aggregation against the selected fields.
When any of these groups match the selected rule conditions, an alert is triggered per group.
aggregationType:
type: string
enum:
- avg
- 95th
- 99th
- 99th
description: The type of aggregation to perform.