v1
latestOpenAPI 3.0.02026-07-142351,1971.3 MBMonitors
Validate an existing monitor
Validate the monitor provided in the request.
Note: Log monitors require an unscoped App Key and logs_read_data permission.
post/api/v1/monitor/{monitor_id}/validate
Path parameters
monitor_idinteger required
Example:666486743
The ID of the monitor
Request body
Example request
{
"assets": [
{
"category": "runbook",
"name": "Monitor Runbook",
"resource_key": "12345",
"url": "/notebooks/12345"
}
],
"matching_downtimes": [
{
"end": 1412792983,
"id": 1625,
"scope": [
"env:staging"
],
"start": 1412792983
}
],
"name": "My monitor",
"options": {
"aggregation": {
"group_by": "host",
"metric": "metrics.name",
"type": "count"
},
"scheduling_options": {
"custom_schedule": {
"recurrences": [
{
"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR",
"start": "2023-08-31T16:30:00",
"timezone": "Europe/Paris"
}
]
},
"evaluation_window": {
"day_starts": "04:00",
"month_starts": 1,
"timezone": "Europe/Paris"
}
},
"thresholds": {
"critical_query": "formula(\"2 * query1\").rollup(\"avg\").last(\"6mo\")",
"critical_recovery_query": "formula(\"1.5 * query1\").rollup(\"avg\").last(\"3mo\")"
},
"variables": [
{
"compute": {
"aggregation": "avg",
"interval": 60000,
"metric": "@duration",
"name": "compute_result",
"source": "filter_query"
},
"data_source": "rum",
"group_by": [
{
"facet": "status",
"limit": 10,
"sort": {
"aggregation": "avg",
"order": "asc"
},
"source": "filter_query"
}
],
"indexes": [
"days-3",
"days-7"
],
"name": "query_errors",
"search": {
"query": "service:query"
}
}
]
},
"query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100",
"type": "query alert"
}Response
OK
object required
Example response
{}