Alert Grouping Rule
Configure rules for automatically grouping related alerts into episodes
Модель Alert Grouping Rule
Свойства
- Имя
_id- Тип
- Object ID
- Описание
ID of this object
- Имя
createdAt- Тип
- Date
- Описание
Date and Time when the object was created.
- Имя
updatedAt- Тип
- Date
- Описание
Date and Time when the object was updated.
- Имя
project- Тип
- Project
- Описание
Relation to Project Resource in which this object belongs
- Имя
projectId- Тип
- Object IDОбязательно
- Описание
ID of your Project in which this object belongs
- Имя
name- Тип
- TextОбязательно
- Описание
Name of this alert grouping rule
- Имя
description- Тип
- Long Text
- Описание
Description of this alert grouping rule
- Имя
priority- Тип
- NumberОбязательно
- Описание
Priority of this rule. Lower number = higher priority. Rules are evaluated in priority order.
- Имя
isEnabled- Тип
- BooleanОбязательно
- Описание
Whether this rule is enabled
- Имя
matchCriteria- Тип
- JSON
- Описание
JSON object defining the criteria for matching alerts to this rule
- Имя
monitors- Тип
- Monitor
- Описание
Only group alerts from these monitors. Leave empty to match alerts from any monitor.
- Имя
alertSeverities- Тип
- Alert Severity
- Описание
Only group alerts with these severities. Leave empty to match alerts of any severity.
- Имя
alertLabels- Тип
- Label
- Описание
Only group alerts that have at least one of these labels. Leave empty to match alerts regardless of alert labels.
- Имя
monitorLabels- Тип
- Label
- Описание
Only group alerts from monitors that have at least one of these labels. Leave empty to match alerts regardless of monitor labels.
- Имя
alertTitlePattern- Тип
- Long Text
- Описание
Regular expression pattern to match alert titles. Leave empty to match any title. Example: 'CPU.*high' matches titles containing 'CPU' followed by 'high'.
- Имя
alertDescriptionPattern- Тип
- Long Text
- Описание
Regular expression pattern to match alert descriptions. Leave empty to match any description.
- Имя
monitorNamePattern- Тип
- Long Text
- Описание
Regular expression pattern to match monitor names. Leave empty to match any monitor name. Example: 'prod-.*' matches monitors starting with 'prod-'.
- Имя
monitorDescriptionPattern- Тип
- Long Text
- Описание
Regular expression pattern to match monitor descriptions. Leave empty to match any monitor description.
- Имя
groupByMonitor- Тип
- Boolean
- Описание
When enabled, alerts from different monitors will be grouped into separate episodes. When disabled, alerts from any monitor can be grouped together.
- Имя
groupBySeverity- Тип
- Boolean
- Описание
When enabled, alerts with different severities will be grouped into separate episodes. When disabled, alerts of any severity can be grouped together.
- Имя
groupByAlertTitle- Тип
- Boolean
- Описание
When enabled, alerts with different titles will be grouped into separate episodes. When disabled, alerts with any title can be grouped together.
- Имя
groupByService- Тип
- Boolean
- Описание
When enabled, alerts from monitors belonging to different services will be grouped into separate episodes. When disabled, alerts can be grouped together regardless of which service the monitor belongs to.
- Имя
enableTimeWindow- Тип
- Boolean
- Описание
Enable time-based grouping. When enabled, alerts are grouped within the specified time window. When disabled, all matching alerts are grouped into a single ongoing episode regardless of time.
- Имя
timeWindowMinutes- Тип
- Number
- Описание
Rolling time window in minutes. Alerts are grouped if they arrive within this gap from the last alert.
- Имя
groupByFields- Тип
- JSON
- Описание
JSON object defining the fields to group alerts by (e.g., monitorId, severity)
- Имя
episodeTitleTemplate- Тип
- Long Text
- Описание
Template for generating episode titles. Supports placeholders like {{alertSeverity}}, {{monitorName}}, {{alertTitle}}, {{alertDescription}}
- Имя
episodeDescriptionTemplate- Тип
- Long Text
- Описание
Template for generating episode descriptions. Supports placeholders like {{alertSeverity}}, {{monitorName}}, {{alertTitle}}, {{alertDescription}}
- Имя
enableResolveDelay- Тип
- Boolean
- Описание
Enable grace period before auto-resolving episode after all alerts resolve. Helps prevent rapid state changes during alert flapping.
- Имя
resolveDelayMinutes- Тип
- Number
- Описание
Grace period in minutes before auto-resolving an episode after all alerts are resolved
- Имя
enableReopenWindow- Тип
- Boolean
- Описание
Enable reopening recently resolved episodes instead of creating new ones. Useful when related issues recur shortly after resolution.
- Имя
reopenWindowMinutes- Тип
- Number
- Описание
Time window in minutes to reopen a recently resolved episode instead of creating a new one
- Имя
enableInactivityTimeout- Тип
- Boolean
- Описание
Enable auto-resolving episodes after a period of inactivity. Helps automatically close episodes when no new alerts arrive.
- Имя
inactivityTimeoutMinutes- Тип
- Number
- Описание
Time in minutes after which an inactive episode will be auto-resolved
- Имя
onCallDutyPolicies- Тип
- On-Call Policy
- Описание
List of on-call duty policies to execute for episodes created by this rule.
- Имя
defaultAssignToUser- Тип
- User
- Описание
Default user to assign episodes created by this rule
- Имя
defaultAssignToUserId- Тип
- Object ID
- Описание
Default User ID to assign episodes created by this rule
- Имя
defaultAssignToTeam- Тип
- Team
- Описание
Default team to assign episodes created by this rule
- Имя
defaultAssignToTeamId- Тип
- Object ID
- Описание
Default Team ID to assign episodes created by this rule
- Имя
episodeLabels- Тип
- Label
- Описание
Labels to automatically apply to episodes created by this rule.
- Имя
episodeOwnerUsers- Тип
- User
- Описание
Users to automatically add as owners to episodes created by this rule.
- Имя
episodeOwnerTeams- Тип
- Team
- Описание
Teams to automatically add as owners to episodes created by this rule.
- Имя
createdByUser- Тип
- User
- Описание
Relation to User who created this object (if this object was created by a User)
- Имя
createdByUserId- Тип
- Object ID
- Описание
User ID who created this object (if this object was created by a User)
/api/alert-grouping-rule/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Alert Grouping Rule». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Alert Grouping Rule, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/alert-grouping-rule/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"isEnabled": true,
"name": true,
"priority": true,
"projectId": true,
"_id": true
},
"query": {
"name": "Example name"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "376c6190-28fe-11f1-b591-3fdcef396aba",
"isEnabled": true,
"name": "Example name",
"priority": 100,
"projectId": "550e8400-e29b-41d4-a716-446655440000"
},
{
"_id": "376c6191-28fe-11f1-b591-3fdcef396aba",
"isEnabled": true,
"name": "Example name",
"priority": 100,
"projectId": "550e8400-e29b-41d4-a716-446655440000"
},
{
"_id": "376c6192-28fe-11f1-b591-3fdcef396aba",
"isEnabled": true,
"name": "Example name",
"priority": 100,
"projectId": "550e8400-e29b-41d4-a716-446655440000"
}
]
}/api/alert-grouping-rule/:id/get-itemПолучить по ID
Возвращает объект «Alert Grouping Rule» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/alert-grouping-rule/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"isEnabled": true,
"name": true,
"priority": true,
"projectId": true,
"_id": true
}
}Ответ
{
"_id": "550e8400-e29b-41d4-a716-446655440000",
"isEnabled": true,
"name": "Example name",
"priority": 100,
"projectId": "550e8400-e29b-41d4-a716-446655440000"
}/api/alert-grouping-rule/countКоличество
Возвращает количество ваших объектов «Alert Grouping Rule».
Необязательное тело запроса
query- Чтобы фильтровать Alert Grouping Rule, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/alert-grouping-rule/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"name": "Example name"
}
}Ответ
{
"count": 107
}/api/alert-grouping-ruleСоздать Alert Grouping Rule
Создаёт новый объект.
Запрос создания
POST/api/alert-grouping-ruleContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"isEnabled": true,
"name": "Example name",
"priority": 100,
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"alertDescriptionPattern": "Example alert description pattern"
}
}Ответ
{
"_id": "550e8400-e29b-41d4-a716-446655440000",
"isEnabled": true,
"name": "Example name",
"priority": 100,
"projectId": "550e8400-e29b-41d4-a716-446655440000"
}/api/alert-grouping-rule/:idОбновить по ID
Обновляет объект по ID.
Альтернативные методы
Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:
Запрос обновления
PUT/api/alert-grouping-rule/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"isEnabled": true,
"name": "Example name",
"priority": 100
}
}Ответ
{}/api/alert-grouping-rule/:idУдалить по ID
Удаляет объект по ID.
Альтернативные методы
Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:
Запрос удаления
DELETE/api/alert-grouping-rule/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Ответ
{}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Alert Grouping Rule
Project OwnerProject AdminProject MemberRead Alert Grouping RuleRead All Project Resources
Права на создание
Нужны для создания Alert Grouping Rule
Project OwnerProject AdminCreate Alert Grouping Rule
Права на обновление
Нужны для обновления Alert Grouping Rule
Project OwnerProject AdminEdit Alert Grouping Rule
Права на удаление
Нужны для удаления Alert Grouping Rule
Project OwnerProject AdminDelete Alert Grouping Rule