Create a monitor
create_monitorCreate a scheduled uptime monitor for a URL, host, or port across one or more regions; use it to probe availability and return the monitor configuration.
Instructions
Create one monitor that checks a URL, host or port on a schedule from one or more regions, and return it in the get_monitor shape. Use check_target first to catch a typo or an unreachable host; use bulk_create_monitors for several monitors, and create_heartbeat for a job that should report in rather than be probed. Requires a key with the write scope. Plan limits apply (monitor count, minimum interval, monitors faster than 60 seconds, regions per monitor): breaking one is a 403 naming it, so call get_plan_usage first. A paused monitor still counts toward them. change_alerts_enabled turns on change alerts for the monitor (default false): on a DNS monitor, a confirmed NOTICE change of its DNS answers, outside maintenance and not reverted, goes to the monitor's alert channels. Certificate changes send no change alert; they show in the feed and the weekly digest, and a new certificate that stops covering a monitored host sends SSL_COVERAGE_LOST whatever this is set to. An invalid argument is a 422 naming it. The example shows the shape for a plan with one region per monitor; take interval_seconds and regions from the user and get_plan_usage, not from it. Example: {"name": "API", "type": "HTTP", "target": "https://api.example.com/health", "interval_seconds": 600, "timeout_seconds": 10, "regions": ["us-east"], "config": {"expected_status_codes": [200]}, "tags": ["env:prod"]}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"type": "<type>",
"target": "<target>",
"interval_seconds": "<interval_seconds>",
"timeout_seconds": "<timeout_seconds>",
"regions": "<regions>"
},
"name": "create_monitor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name, 1 to 255 characters. | |
| tags | No | Flat labels for grouping and filtering, for example env:prod or service:api, at most 10. Each tag is trimmed, lowercased and deduplicated on write, at most 50 characters of a-z, 0-9 and : _ . / -, starting with a letter or digit. Reuse names from list_tags rather than inventing near-duplicates. | |
| type | Yes | HTTP (a URL answers with an expected status), PING (a host answers ICMP), SSL (a certificate is valid and not about to expire), TCP (a port is open, or a list of ports is closed) or DNS (a record resolves, optionally to an expected value). Cannot be changed after create. | |
| config | No | An object whose fields depend on type, all optional unless stated. HTTP: method (GET, HEAD, POST, PUT, PATCH or DELETE, any case; default GET); expected_status_codes (non-empty list of codes 100 to 599, default [200]); keyword (case-sensitive substring the body must contain, at most 1024 characters, not with HEAD); follow_redirects (default true); verify_ssl (default true; false skips TLS verification, so the monitor can never report TLS_INVALID); request_headers (object of name to value: at most 20, a name at most 128 characters of letters, digits and ! # $ % & ' * + - . ^ _ ` | ~, a value at most 1024 bytes of printable ASCII, space or tab, the whole object at most 8192 bytes as JSON; names differing only in case, and Host, Content-Length, Transfer-Encoding, Connection, Upgrade, TE, Trailer, Keep-Alive, CF-Connecting-IP or any Proxy-* name, are a 422); request_body (string, at most 8192 bytes as UTF-8, needs POST, PUT, PATCH or DELETE). Reads return every request_headers value as the literal __FETTLE_UNCHANGED__; writing that literal back in an update keeps the stored value (on create it is a 422). PING: packet_count (1 to 20, default 4). SSL: warn_before_days (1 to 365, default 14; the first expiry alert, then again at 30, 14, 7 and 1 day left, whichever come after it) and port (1 to 65535, default 443). TCP: either port (1 to 65535) with expected_state "open" (default) or "closed", or ports (1 to 20 distinct ports that must all be closed, which needs expected_state "closed", exactly one region and interval_seconds of at least 300; a check fails when any of them accepts a connection, and the monitor goes DOWN once confirmation_threshold failures confirm it). Both port and ports, or neither, is a 422; expected_state values are lowercase. DNS: record_type (A, AAAA, CNAME, MX, TXT, NS or SRV; required) and expected_value (at most 2048 characters). With expected_value one answer must equal it (case-insensitive, ignoring surrounding spaces and a trailing dot; exact for TXT); without it any answer passes. MX answers are the mail host names without priority (mail.example.com, not 10 mail.example.com). A and AAAA look up every address of the host, IPv4 and IPv6 alike, and any one may match; write an IPv6 address in its shortest form. SRV: the target is the full name (_sip._tcp.example.com) and each answer reads priority weight port target (10 60 5060 sip.example.com); expected_value is either all four fields, which must all match, or target:port (sip.example.com:5060), which ignores priority and weight; any other SRV expected_value is a 422. Omit it for HTTP, PING or SSL to take the defaults; a TCP or DNS monitor without it is a 422. | |
| target | Yes | What to check, up to 2048 characters. HTTP: an http:// or https:// URL (https:// is added when the scheme is missing; port, path and query are kept). PING, SSL, TCP and DNS: a bare public hostname or IP address with no :port and no path (the port goes in config): host:port is a 422, and a full URL is cut down to its host, losing its port. Hostnames are ASCII (punycode for internationalized domains). DNS names may also carry underscore labels, as in _dmarc.example.com; other types refuse them. localhost, *.localhost and addresses that are not public (private, loopback, link-local, CGNAT 100.64.0.0/10, reserved, unspecified) are a 422. Cannot be changed after create. | |
| regions | Yes | One or more distinct region codes: the plan's choices are limits.allowed_regions in get_plan_usage. An unknown code, or more regions than max_regions, is a 403. SSL, DNS and TCP monitors with a ports list take exactly one region (422 otherwise). Unless the user names regions, pass every code in limits.allowed_regions, up to the plan's max_regions. | |
| is_active | No | Default true. false creates it paused: no check runs until resume_monitor. | |
| channel_ids | No | Notification channel uuids from list_channels; email addresses are channels too. Omit it or pass [] to alert every working channel of the organization. A list replaces that default: only the listed channels are alerted, nobody else is emailed implicitly. An id that is not an active channel of this organization is a 404. Once every bound channel is deleted, every working channel is alerted. If none of the channels works, the organization's owner is emailed. | |
| timeout_seconds | Yes | Seconds one check may take before it fails, 1 to 120. | |
| interval_seconds | Yes | Seconds between checks, 30 to 86400. The plan sets a minimum (limits.min_interval_seconds) and caps how many monitors may check more often than every 60 seconds (max_fast_monitors); breaking either is a 403 naming the limit. Tell the user the interval you chose. | |
| change_alerts_enabled | No | Turns on change alerts for this monitor, default false. On a DNS monitor, a confirmed NOTICE change of its DNS answers, outside maintenance and not reverted, goes to the monitor's alert channels. Certificate changes send no change alert; they show in the feed and the weekly digest, and a new certificate that stops covering a monitored host sends SSL_COVERAGE_LOST whatever this is set to. | |
| domain_expiry_enabled | No | Watch the expiry date of the target's registered domain (RDAP) and alert before it lapses, and when the registry puts the domain on hold or no longer lists it. HTTP monitors whose target is a domain name only, and not a subdomain of a hosting platform such as *.herokuapp.com or *.github.io; any other target is a 422. Default false. | |
| confirmation_threshold | No | How many checks in a row must fail in every region before the monitor goes DOWN and an incident opens, 1 to 10; 2 when not set on create. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| tags | No | ||
| type | Yes | Known values: HTTP, PING, SSL, TCP, DNS. | |
| config | Yes | ||
| status | Yes | Known values: PENDING, UP, DEGRADED, DOWN, PAUSED. | |
| target | Yes | ||
| regions | Yes | ||
| user_id | Yes | ||
| is_active | Yes | ||
| created_at | Yes | ||
| resumed_at | Yes | When the monitor was last resumed after a pause; null if it was never resumed. A resume puts the monitor back to PENDING while last_checked_at keeps its pre-pause value. | |
| updated_at | Yes | ||
| channel_ids | No | Bound notification channels. Empty means every working channel of the organization is alerted. | |
| next_run_at | Yes | ||
| badge_enabled | No | ||
| domain_expiry | No | ||
| ssl_cert_info | No | ||
| ssl_expires_at | Yes | ||
| last_checked_at | Yes | ||
| region_statuses | Yes | Per-region latest status, sorted by region name. Built from ``region_snapshots``; ``job_id`` is dropped (internal dedup key) and malformed/partial snapshot rows are skipped rather than failing the read. | |
| timeout_seconds | Yes | ||
| interval_seconds | Yes | ||
| change_alerts_enabled | No | ||
| domain_expiry_enabled | No | ||
| confirmation_threshold | Yes |