Monitor
Monitor is anything that monitors your API, Websites, IP, Network or more. You can also create static monitor that does not monitor anything.
Модель Monitor
Свойства
- Имя
_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Обязательно
- Описание
Any friendly name for this monitor
- Имя
description- Тип
- Long Text
- Описание
Friendly description that will help you remember
- Имя
slug- Тип
- SlugОбязательно
- Описание
Friendly globally unique name for your object
- Имя
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)
- Имя
labels- Тип
- Label
- Описание
Relation to Labels Array where this object is categorized in.
- Имя
monitorType- Тип
- Monitor TypeОбязательно
- Описание
What is the type of this monitor? Website? API? etc.
- Имя
currentMonitorStatus- Тип
- Monitor Status
- Описание
Whats the current status of this monitor?
- Имя
currentMonitorStatusId- Тип
- Object IDОбязательно
- Описание
Whats the current status ID of this monitor?
- Имя
monitorSteps- Тип
- Monitor Steps
- Описание
What would you like to monitor and what is the criteria?
- Имя
monitoringInterval- Тип
- Text
- Описание
How often would you like to monitor this resource?
- Имя
customFields- Тип
- JSON
- Описание
Custom Fields on this resource.
- Имя
disableActiveMonitoring- Тип
- BooleanОбязательно
- Описание
Disable active monitoring for this resource?
- Имя
incomingRequestMonitorHeartbeatCheckedAt- Тип
- Date
- Описание
This field is for Incoming Request monitor only. When was the last time we checked the heartbeat?
- Имя
telemetryMonitorNextMonitorAt- Тип
- Date
- Описание
This field is for Telemetry Monitor only. When is the next time we should monitor?
- Имя
telemetryMonitorLastMonitorAt- Тип
- Date
- Описание
This field is for Telemetry Monitor only. When was the last time we monitored?
- Имя
disableActiveMonitoringBecauseOfScheduledMaintenanceEvent- Тип
- BooleanОбязательно
- Описание
Disable Monitoring because of Ongoing Scheduled Maintenance Event
- Имя
disableActiveMonitoringBecauseOfManualIncident- Тип
- BooleanОбязательно
- Описание
Disable Monitoring because of Incident which is creeated manually by user.
- Имя
serverMonitorRequestReceivedAt- Тип
- Date
- Описание
This field is for Server Monitor only. When was the last time we received a request?
- Имя
serverMonitorSecretKey- Тип
- Object ID
- Описание
This field is for Server Monitor only. Secret Key to authenticate the request.
- Имя
incomingRequestSecretKey- Тип
- Object ID
- Описание
This field is for Incoming Request Monitor only. Secret Key to authenticate the request.
- Имя
incomingMonitorRequest- Тип
- JSON
- Описание
Incoming Monitor Request for Incoming Request Monitor
- Имя
incomingEmailSecretKey- Тип
- Object ID
- Описание
This field is for Incoming Email Monitor only. Secret Key used to generate unique email address.
- Имя
incomingEmailMonitorLastEmailReceivedAt- Тип
- Date
- Описание
This field is for Incoming Email Monitor only. When was the last email received?
- Имя
incomingEmailMonitorRequest- Тип
- JSON
- Описание
This field is for Incoming Email Monitor only. Last email data received.
- Имя
incomingEmailMonitorHeartbeatCheckedAt- Тип
- Date
- Описание
This field is for Incoming Email monitor only. When was the last time we checked the heartbeat?
- Имя
serverMonitorResponse- Тип
- JSON
- Описание
Server Monitor Response for Server Monitor
- Имя
isAllProbesDisconnectedFromThisMonitor- Тип
- Boolean
- Описание
All Probes Disconnected From This Monitor. Is this monitor not being monitored?
- Имя
isNoProbeEnabledOnThisMonitor- Тип
- Boolean
- Описание
No Probe Enabled On This Monitor. Is this monitor not being monitored?
- Имя
minimumProbeAgreement- Тип
- Number
- Описание
Minimum number of probes that must agree on a status before the monitor status changes. If null, all enabled and connected probes must agree.
/api/monitor/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Monitor». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Monitor, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/monitor/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"currentMonitorStatusId": true,
"disableActiveMonitoring": true,
"monitorType": true,
"name": true,
"projectId": true
},
"query": {
"name": "Production API Server"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "377477e0-28fe-11f1-b591-3fdcef396aba",
"currentMonitorStatusId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"disableActiveMonitoring": false,
"monitorType": "API",
"name": "Production API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
},
{
"_id": "377477e1-28fe-11f1-b591-3fdcef396aba",
"currentMonitorStatusId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"disableActiveMonitoring": false,
"monitorType": "API",
"name": "Production API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
},
{
"_id": "377477e2-28fe-11f1-b591-3fdcef396aba",
"currentMonitorStatusId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"disableActiveMonitoring": false,
"monitorType": "API",
"name": "Production API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}
]
}/api/monitor/:id/get-itemПолучить по ID
Возвращает объект «Monitor» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/monitor/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"currentMonitorStatusId": true,
"disableActiveMonitoring": true,
"monitorType": true,
"name": true,
"projectId": true
}
}Ответ
{
"_id": "377477e0-28fe-11f1-b591-3fdcef396aba",
"currentMonitorStatusId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"disableActiveMonitoring": false,
"monitorType": "API",
"name": "Production API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}/api/monitor/countКоличество
Возвращает количество ваших объектов «Monitor».
Необязательное тело запроса
query- Чтобы фильтровать Monitor, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/monitor/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"name": "Production API Server"
}
}Ответ
{
"count": 107
}/api/monitorСоздать Monitor
Создаёт новый объект.
Запрос создания
POST/api/monitorContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"currentMonitorStatusId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"disableActiveMonitoring": false,
"monitorType": "API",
"name": "Production API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}
}Ответ
{
"_id": "377477e0-28fe-11f1-b591-3fdcef396aba",
"currentMonitorStatusId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"disableActiveMonitoring": false,
"monitorType": "API",
"name": "Production API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}/api/monitor/:idОбновить по ID
Обновляет объект по ID.
Альтернативные методы
Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:
Запрос обновления
PUT/api/monitor/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"currentMonitorStatusId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"disableActiveMonitoring": false,
"name": "Production API Server"
}
}Ответ
{}/api/monitor/:idУдалить по ID
Удаляет объект по ID.
Альтернативные методы
Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:
Запрос удаления
DELETE/api/monitor/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Ответ
{}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Monitor
Project OwnerProject AdminProject MemberRead MonitorRead All Project Resources
Права на создание
Нужны для создания Monitor
Project OwnerProject AdminProject MemberCreate Monitor
Права на обновление
Нужны для обновления Monitor
Project OwnerProject AdminProject MemberEdit Monitor
Права на удаление
Нужны для удаления Monitor
Project OwnerProject AdminProject MemberDelete Monitor