Skip to content
SysOps 24/7

Monitor types

Seven kinds of check. The type decides what a target means and what counts as a failure.

https & http

Fetches a URL and checks the response. The one you want for a website or an API.

json
{ "name": "api", "type": "https", "target": "https://api.example.com",
  "settings": {
    "valid_status_codes": [200, 204],
    "body_keyword": "ok",
    "response_time_warning_ms": 2000
  } }

Without valid_status_codes, any 2xx passes. Set it when a 301 to a login page would otherwise look healthy — which is the usual way a broken deploy passes monitoring.

Checking the body, not just the status

body_keywordis what separates “the web server is running” from “the application works”. A frontend that renders an error page still returns 200, and the difference matters at 3am.

ssl

Watches a TLS certificate and alerts before it expires, which is the outage everyone has once and never forgets. Set ssl_expiry_warning_days to however long you need to renew.

json
{ "name": "cert", "type": "ssl", "target": "https://example.com",
  "settings": { "ssl_expiry_warning_days": 21 } }

tcp

Opens a connection to a host and port. For things that are not HTTP: a database, a message broker, an SMTP server.

json
{ "name": "db", "type": "tcp", "target": "db.example.com:5432" }

dns

Resolves a name and checks it answers. Catches an expired domain or a botched nameserver change — failures that look like everything being down at once.

json
{ "name": "apex", "type": "dns", "target": "example.com",
  "settings": { "dns_query_type": "A" } }

icmp

Pings a host. Useful for network gear; a poor proxy for whether a service works.

heartbeat

The inside-out one. Instead of us checking your service, your service checks in with us — and we alert when it stops. This is how you monitor a cron job, a nightly backup, or a queue worker: things whose failure is silence.

A heartbeat has no target. You get a URL; call it on success.

bash
0 2 * * *  /path/to/backup.sh && curl -fsS https://sysops247.io/api/v1/ping/<token>

Note the &&. The ping must only fire if the job actually succeeded, or you have built a monitor that reports success whenever cron is running.

grace_seconds is the slack beyond the interval before a missed ping alerts. A nightly job that usually takes twenty minutes wants an hour of grace, so a slow night is not an incident.

All settings

FieldTypeNotes
methodstringHTTP method. Defaults to GET.
valid_status_codesnumber[]Codes that count as healthy. Default: any 2xx.
body_keywordstringMust appear in the response body.
body_not_keywordstringMust NOT appear. Good for catching an error page that returns 200.
follow_redirectsbooleanFollow 3xx before judging the response.
headersobjectSent with the request — an API key for a protected health endpoint.
skip_tls_verifybooleanAccept an invalid certificate. Only for internal hosts with a private CA.
ssl_expiry_warning_daysnumberWarn this many days before the certificate expires.
response_time_warning_msnumberAlert when a response is slower than this, even though it succeeded.
dns_query_typestringFor dns monitors: A, AAAA, CNAME, MX, TXT, NS, SOA, CAA.
alert_sensitivitystringHow stubborn a failure must be before it alerts. See Alerts.

Targets must be publicly reachable. A monitor pointed at a private address — 10.x, 192.168.x, localhost — is refused, because our probes run in our infrastructure and would otherwise be a way to scan it.