API-Referenz · Monitors
Create monitor
Mutation
createMonitorCreates a monitor. Fails when the organization's plan has no monitor quota left or the selected regions aren't available to it.
createMonitor(
organizationId: ID!
spec: MonitorSpecInput!
): Monitor!Argumente
Feld
Typ
Rückgabe
Feld
Typ
Beispiel
mutation CreateMonitor($organizationId: ID!, $spec: MonitorSpecInput!) {
createMonitor(organizationId: $organizationId, spec: $spec) {
id
name
probeType
paused
regionScopes
availabilityPolicy
createdAt
updatedAt
deletedAt
service {
id
name
description
isDeleted
deletedAt
}
scheduling {
intervalSeconds
retries
}
alerts {
id
state
name
description
referenceId
alertedAt
startedAt
resolvedAt
createdAt
relationGroupId
}
probeConfiguration {
__typename
... on ICMPProbeConfiguration {
address
timeoutSeconds
}
... on HTTPProbeConfiguration {
address
timeoutSeconds
method
headers
validStatusCodes
keywords
}
}
probeResults {
metadata {
id
timestamp
succeeded
error
proberRegionSlug
attempts
}
}
regionHealth {
status
}
}
}Beispielantwort
{
"data": {
"createMonitor": {
"id": "01JB3X7T9QK2M4N6P8R0S2T4V6",
"name": "Example name",
"probeType": "ICMP",
"paused": true,
"regionScopes": [
"Example regionScopes"
],
"availabilityPolicy": "ANY_UP",
"createdAt": "2026-01-01T12:00:00Z",
"updatedAt": "2026-01-01T12:00:00Z",
"deletedAt": "2026-01-01T12:00:00Z",
"service": {
"id": 1,
"name": "Example name",
"description": "Example description",
"isDeleted": true,
"deletedAt": "2026-01-01T12:00:00Z"
},
"scheduling": {
"intervalSeconds": 1,
"retries": 1
},
"alerts": [
{
"id": "01JB3X7T9QK2M4N6P8R0S2T4V6",
"state": "ACTIVE",
"name": "Example name",
"description": "Example description",
"referenceId": "01JB3X7T9QK2M4N6P8R0S2T4V6",
"alertedAt": "2026-01-01T12:00:00Z",
"startedAt": "2026-01-01T12:00:00Z",
"resolvedAt": "2026-01-01T12:00:00Z",
"createdAt": "2026-01-01T12:00:00Z",
"relationGroupId": "01JB3X7T9QK2M4N6P8R0S2T4V6"
}
],
"probeConfiguration": {
"__typename": "ICMPProbeConfiguration",
"address": "Example address",
"timeoutSeconds": 1
},
"probeResults": [
{
"metadata": {
"id": "01JB3X7T9QK2M4N6P8R0S2T4V6",
"timestamp": "2026-01-01T12:00:00Z",
"succeeded": true,
"error": "Example error",
"proberRegionSlug": "Example proberRegionSlug",
"attempts": 1
}
}
],
"regionHealth": [
{
"status": "UNKNOWN"
}
]
}
}
}