Skip to content

Commit

Permalink
[OpenAPI][DOCS] Add descriptions for alerting rule flapping properties (
Browse files Browse the repository at this point in the history
#200112)

(cherry picked from commit 50f0016)
  • Loading branch information
lcawl committed Nov 14, 2024
1 parent f470dee commit e00d039
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 1 deletion.
18 changes: 18 additions & 0 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -1853,14 +1853,17 @@
},
"flapping": {
"additionalProperties": false,
"description": "When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.",
"nullable": true,
"properties": {
"look_back_window": {
"description": "The minimum number of runs in which the threshold must be met.",
"maximum": 20,
"minimum": 2,
"type": "number"
},
"status_change_threshold": {
"description": "The minimum number of times an alert must switch states in the look back window.",
"maximum": 20,
"minimum": 2,
"type": "number"
Expand Down Expand Up @@ -2690,14 +2693,17 @@
},
"flapping": {
"additionalProperties": false,
"description": "When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.",
"nullable": true,
"properties": {
"look_back_window": {
"description": "The minimum number of runs in which the threshold must be met.",
"maximum": 20,
"minimum": 2,
"type": "number"
},
"status_change_threshold": {
"description": "The minimum number of times an alert must switch states in the look back window.",
"maximum": 20,
"minimum": 2,
"type": "number"
Expand Down Expand Up @@ -3091,14 +3097,17 @@
},
"flapping": {
"additionalProperties": false,
"description": "When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.",
"nullable": true,
"properties": {
"look_back_window": {
"description": "The minimum number of runs in which the threshold must be met.",
"maximum": 20,
"minimum": 2,
"type": "number"
},
"status_change_threshold": {
"description": "The minimum number of times an alert must switch states in the look back window.",
"maximum": 20,
"minimum": 2,
"type": "number"
Expand Down Expand Up @@ -3918,14 +3927,17 @@
},
"flapping": {
"additionalProperties": false,
"description": "When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.",
"nullable": true,
"properties": {
"look_back_window": {
"description": "The minimum number of runs in which the threshold must be met.",
"maximum": 20,
"minimum": 2,
"type": "number"
},
"status_change_threshold": {
"description": "The minimum number of times an alert must switch states in the look back window.",
"maximum": 20,
"minimum": 2,
"type": "number"
Expand Down Expand Up @@ -4312,14 +4324,17 @@
},
"flapping": {
"additionalProperties": false,
"description": "When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.",
"nullable": true,
"properties": {
"look_back_window": {
"description": "The minimum number of runs in which the threshold must be met.",
"maximum": 20,
"minimum": 2,
"type": "number"
},
"status_change_threshold": {
"description": "The minimum number of times an alert must switch states in the look back window.",
"maximum": 20,
"minimum": 2,
"type": "number"
Expand Down Expand Up @@ -5817,14 +5832,17 @@
},
"flapping": {
"additionalProperties": false,
"description": "When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.",
"nullable": true,
"properties": {
"look_back_window": {
"description": "The minimum number of runs in which the threshold must be met.",
"maximum": 20,
"minimum": 2,
"type": "number"
},
"status_change_threshold": {
"description": "The minimum number of times an alert must switch states in the look back window.",
"maximum": 20,
"minimum": 2,
"type": "number"
Expand Down
60 changes: 60 additions & 0 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1652,14 +1652,24 @@ paths:
- last_execution_date
flapping:
additionalProperties: false
description: >-
When flapping detection is turned on, alerts that switch
quickly between active and recovered states are identified
as “flapping” and notifications are reduced.
nullable: true
type: object
properties:
look_back_window:
description: >-
The minimum number of runs in which the threshold must
be met.
maximum: 20
minimum: 2
type: number
status_change_threshold:
description: >-
The minimum number of times an alert must switch
states in the look back window.
maximum: 20
minimum: 2
type: number
Expand Down Expand Up @@ -2425,14 +2435,24 @@ paths:
type: boolean
flapping:
additionalProperties: false
description: >-
When flapping detection is turned on, alerts that switch
quickly between active and recovered states are identified
as “flapping” and notifications are reduced.
nullable: true
type: object
properties:
look_back_window:
description: >-
The minimum number of runs in which the threshold must
be met.
maximum: 20
minimum: 2
type: number
status_change_threshold:
description: >-
The minimum number of times an alert must switch states
in the look back window.
maximum: 20
minimum: 2
type: number
Expand Down Expand Up @@ -2825,14 +2845,24 @@ paths:
- last_execution_date
flapping:
additionalProperties: false
description: >-
When flapping detection is turned on, alerts that switch
quickly between active and recovered states are identified
as “flapping” and notifications are reduced.
nullable: true
type: object
properties:
look_back_window:
description: >-
The minimum number of runs in which the threshold must
be met.
maximum: 20
minimum: 2
type: number
status_change_threshold:
description: >-
The minimum number of times an alert must switch
states in the look back window.
maximum: 20
minimum: 2
type: number
Expand Down Expand Up @@ -3577,14 +3607,24 @@ paths:
- active
flapping:
additionalProperties: false
description: >-
When flapping detection is turned on, alerts that switch
quickly between active and recovered states are identified
as “flapping” and notifications are reduced.
nullable: true
type: object
properties:
look_back_window:
description: >-
The minimum number of runs in which the threshold must
be met.
maximum: 20
minimum: 2
type: number
status_change_threshold:
description: >-
The minimum number of times an alert must switch states
in the look back window.
maximum: 20
minimum: 2
type: number
Expand Down Expand Up @@ -3969,14 +4009,24 @@ paths:
- last_execution_date
flapping:
additionalProperties: false
description: >-
When flapping detection is turned on, alerts that switch
quickly between active and recovered states are identified
as “flapping” and notifications are reduced.
nullable: true
type: object
properties:
look_back_window:
description: >-
The minimum number of runs in which the threshold must
be met.
maximum: 20
minimum: 2
type: number
status_change_threshold:
description: >-
The minimum number of times an alert must switch
states in the look back window.
maximum: 20
minimum: 2
type: number
Expand Down Expand Up @@ -5205,14 +5255,24 @@ paths:
- last_execution_date
flapping:
additionalProperties: false
description: >-
When flapping detection is turned on, alerts that switch
quickly between active and recovered states are identified
as “flapping” and notifications are reduced.
nullable: true
type: object
properties:
look_back_window:
description: >-
The minimum number of runs in which the threshold must
be met.
maximum: 20
minimum: 2
type: number
status_change_threshold:
description: >-
The minimum number of times an alert must switch
states in the look back window.
maximum: 20
minimum: 2
type: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,24 @@ import { validateFlapping as validateFlappingV1 } from '../../../validation/vali
export const flappingSchema = schema.object(
{
look_back_window: schema.number({
meta: { description: 'The minimum number of runs in which the threshold must be met.' },
min: MIN_LOOK_BACK_WINDOW_V1,
max: MAX_LOOK_BACK_WINDOW_V1,
}),
status_change_threshold: schema.number({
meta: {
description:
'The minimum number of times an alert must switch states in the look back window.',
},
min: MIN_STATUS_CHANGE_THRESHOLD_V1,
max: MAX_STATUS_CHANGE_THRESHOLD_V1,
}),
},
{ validate: validateFlappingV1 }
{
validate: validateFlappingV1,
meta: {
description:
'When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced.',
},
}
);

0 comments on commit e00d039

Please sign in to comment.