Skip to content

Monitors and conditions

Monitor types, common settings and the condition language used to decide whether a check passed.

A monitor describes what to check, from where and how often. Every check result is evaluated against the monitor’s conditions; a result is “up” only if all conditions pass.

The monitor list: for each monitor its state, type, the state of each region, the quorum, the response time, a bar for each of the last 30 days and the uptime figure.
The monitor list. A monitor inside a maintenance window says so under its name.

Monitor types

TypeChecks
httpHTTP(S) request; status, headers, body and response time
keywordHTTP request whose body must contain (or not contain) a keyword
tcpA TCP connection to host:port can be opened — and, if you like, what the service answers (below)
icmpPing round-trip and packet loss
dnsA name’s records — that there are some, what they say, that they did not change — and the response code
tlsCertificate validity and days until expiry — on a mail server’s submission port with STARTTLS too (below)
domainWhen the domain’s registration expires, as its registry says (below)
mail_authA domain’s SPF, DKIM and DMARC records: that they are valid, and that they did not change (below)
rblWhether a mail server’s address is on a DNS blocklist (below)
heartbeatYour job pings Heimdall; missing pings mean down

Common settings

  • interval: how often each region checks; the shortest interval is 3 min on Free, 30 s on Pro, 20 s on Team, 15 s on Business
  • timeout: per-check timeout
  • regions: where to check from, public regions or your private locations; choosing regions needs Team and Business
  • quorum: how many regions must agree; defaults to a majority, a custom quorum needs Business
  • fail_threshold / recovery_threshold: consecutive results per region, default 2
  • tags: key:value labels, up to 20 (below)
  • depends_on: a monitor this one depends on; its alerts wait while that one is down (below)

Tags

A tag is key:value: env:prod, service:api, team:backend. The key says what kind of thing the tag tells and is written in a–z, 0–9 and _ . - (capitals are kept as lowercase); the value says which one, in any letters, digits and _ . - / :, without spaces. A monitor can carry several values of one key, region:ist and region:fra. What is not key:value is not taken: the form says so and keeps what you typed.

The tags field of the monitor form with four tags as chips: env:prod, service:api, team:backend and region:ist.
Tags in the monitor form, under “Advanced”. Enter or a comma adds one; the organisation’s tags are offered as you type.

The monitor list shows each monitor’s tags and filters by them: pick one from the Tag menu, or select a tag on a row. Filters add up — every one must match — and a key alone (“env: any”) matches every value of it. The filters are in the address, so a filtered list can be bookmarked or shared.

The monitor list filtered by team:backend and by any value of env: two of eight monitors are shown, each with its tags under its name.
Two filters at once: team:backend, and any value of env.

Depends on

A monitor can depend on another one of the organisation: the shop on its database, every site on the router in front of them. While the monitor it depends on is down (or flapping), an incident of this one still opens, shows in the app and counts in its uptime, but alerts nobody; its timeline says “No alerts: Router, which this monitor depends on, is down”. The one that is down alerts as any monitor does, so you hear of the cause once rather than of every service behind it.

When the one it depends on is back — recovered, paused, deleted, or no longer the one it depends on — Heimdall waits for this monitor’s next checks: if they fail, its alerts start then, from the first step of its escalation, and the timeline says why; if it recovers, nobody hears of it. When its checks say nothing (a heartbeat, a monitor that cannot be checked), its alerts start once those checks have had their time, at most 15 minutes. A monitor that stays down is always alerted in the end. An incident that was already alerting when the monitor it depends on went down goes on alerting, as one does when a maintenance window begins.

A monitor holds back only what is as serious as itself or less, and only of its own team when both have one: a critical shop behind a minor test router, or team B’s service behind team A’s router, is alerted as usual. And for an hour at most: if the monitor it depends on is still down an hour after this one’s incident opened — acknowledged and forgotten, say — its alerts start anyway. Nor does it hold anything once its own incident has been closed while it is still down: then nobody would hear of either. A domain expiry, TLS certificate, email authentication or blocklist monitor can be chosen but holds nothing: it is down for weeks before a renewal or while a mail record is broken, and a name or a certificate about to expire — or a broken SPF record — does not mean the services behind it cannot be reached.

It works along a chain: an app that depends on a server that depends on a router is held while either of them is down. A monitor in the chain that cannot hold — a domain, certificate, email authentication or blocklist monitor, one less serious, another team’s — is passed over, and the ones above it still hold. A monitor cannot depend on itself, or on one that depends on it directly or through others: the form leaves those out and the API refuses them. Choose it under “Advanced” in the monitor form; the monitor’s page shows it in its configuration (the “?” next to its name).

A monitor’s page while it is down: its target and state, a banner for the open incident, the availability card with uptime, downtime and outages, the state of each region, its incidents and maintenance windows, and the response-time chart with one line per region.
A monitor’s page: its uptime, what each region sees right now, its incidents, and the response times of the last 24 hours.

Conditions

Conditions are short expressions on placeholders such as [STATUS] or [BODY]. Each one passes or fails with a readable message that ends up on the incident.

Condition examples
[STATUS] == 200
[STATUS] < 400
[RESPONSE_TIME] < 800          # milliseconds
[BODY] == pat(*Warewave*)
[BODY].status == ok            # JSON path
[CERT_EXPIRY] > 336h
[CONNECTED] == true            # tcp / icmp
[DNS_RCODE] == NOERROR
[RECORD_COUNT] > 0             # dns: at least one record
[RECORDS] == pat(*mail.example.com*)
[IP] == 203.0.113.10
[DOMAIN_EXPIRY] > 30d          # domain
[SPF_STATUS] == valid          # mail_auth (below)
[LISTED_COUNT] == 0            # rbl: on no list that counts

DNS records

A name whose records were deleted still answers NOERROR: a dns monitor that checks only the response code stays up when your MX records are gone. So a new dns monitor also checks [RECORD_COUNT] > 0 — at least one record of its type (A, AAAA, CNAME, MX, NS or TXT). [RECORDS] looks at the records themselves, as the check shows them (10 mx1.example.com. for an MX record, the text of a TXT record):

  • [RECORDS] == mail.example.com — some record is this one; !=: none is
  • [RECORDS] == pat(*.mail.protection.outlook.com*) — some record matches the pattern (* any run, ? one character)
  • [RECORDS] == set(10 mx1.example.com, 20 mx2.example.com) — the records are exactly these, in any order: a record that changed, was added or was deleted makes the monitor down
  • Names are compared without case and without their last dot, addresses as addresses; a TXT record’s text exactly as it is. In set(…) an item with a comma goes in quotes: set("v=spf1 include:_spf.example.com ~all", "a=1, b=2")

In the form, “Test now” on an MX, NS or TXT monitor shows the records it got and offers “Alert when these records change”: it adds that set(…) for you and, unless you chose its severity, makes a new monitor major — a changed record is mostly somebody’s deliberate edit, worth a message rather than a call at night. It is not offered for A, AAAA and CNAME records: a name behind a CDN, GeoDNS or a load balancer answers differently from region to region and over the day, so one region’s answer would look “changed” to the others. Check those with [RECORD_COUNT] > 0 or a pattern. A condition on [RECORDS] holds up to 2 000 characters, enough for a domain’s TXT records; a monitor’s conditions 4 000 together. A private location checks these conditions once its probe is updated; an older probe refuses them.

TCP: send and expect

An open port only says that something listens. To know that it is the right service and that it answers, give a tcp monitor what to send and what to expect under “Send and expect”: the probe writes Send once the connection is open, then reads until Expect arrives. If something else comes, the connection closes or nothing comes before the timeout, the check is down — whatever its conditions say — and its error shows what came.

ServiceSendExpect
SSH (port 22)—SSH-2.0
RedisPING\r\n+PONG
A mail server (port 25, 587)—220
FTP (port 21)—220
A plain HTTP serverHEAD / HTTP/1.0\r\n\r\nHTTP/1.
  • Escapes: \r, \n, \t, \0, \\ and \xHH (a byte in hex). Any other backslash is refused, so a typing mistake is not sent as written. Send is at most 256 bytes, Expect 128.
  • Expect alone waits for what a service says first: SSH, mail and FTP servers greet before you speak. Send alone only checks that the write went through.
  • Nothing is sent to a mail port (25, 465, 587, 2525): leave Send empty there and expect the greeting. To check the TLS of a submission port, use a tls monitor with STARTTLS (below).
  • Response time ([RESPONSE_TIME]) is then the whole exchange, from connecting to the expected text.
  • A private location checks Send and Expect once its probe is updated; an older probe only connects.

Domain expiry

A domain monitor asks the registry of your domain when its registration expires, and goes down when less time is left than its condition allows — [DOMAIN_EXPIRY] > 30d for a new one: a month to renew, and to notice an automatic renewal that failed. Its target is the registered domain itself: example.com or example.com.tr, not www.example.com.

  • Where the date comes from: RDAP, the registries’ own lookup service, for .com, .net, .org and most other domains; for .tr, TRABIS. A domain whose registry has neither (many country domains: .io, .de, .eu) cannot be added.
  • How often: every 6, 12 (a new monitor) or 24 hours, on every plan — an expiry date moves once a year, and the registry is somebody else’s server.
  • What it says: the time left, “expired” when the registration has ended, “not registered” when the registry does not know the name. “Test now” shows the date and the registry asked.
  • When the registry does not answer, or publishes no expiry date, nothing is decided: the check counts neither as up nor as down, and the monitor waits for the next answer. If that lasts, the monitor’s page says the registry is not answering; nobody is mailed or called for it — the registry is neither yours nor ours to fix.

Mail servers: STARTTLS

A mail server’s submission port (587) starts in plain text and switches to TLS when the client asks. A tls monitor with Connection: STARTTLS (SMTP) (tls.starttls: smtp in the API) checks it the way a mail program connects: it reads the greeting, introduces itself with EHLO, asks for STARTTLS, and then checks the certificate it gets — the chain, the name, the expiry, [CERT_EXPIRY] and [CONNECTED] as on any tls monitor. Then it says QUIT. Nothing else is ever sent: no sign-in, no sender, no recipient, no mail.

  • The address is host:port: smtp.example.com:587, or another submission port such as 2525. Choosing STARTTLS adds :587 to a host without a port. The certificate must be for that name.
  • Port 465 speaks TLS from the first byte: check it with Plain TLS, as smtp.example.com:465.
  • Port 25 is not supported. The clouds our probes run in block outbound connections to port 25, so no check of an MX there could pass; the form and the API refuse it.
  • What makes it down, with the reason in the result and the alert: a greeting other than 220 (SMTP greeting: 421 "…"); an EHLO answer without STARTTLS (STARTTLS not offered (EHLO did not list it)) — TLS was turned off, or something on the way strips it, the downgrade this check is there to catch; a refused STARTTLS (STARTTLS refused: 454 "…"); and a handshake or certificate that fails, as for any tls monitor.
  • Every 5 minutes at most, on every plan: the server’s admins see each connection in their logs. They see the probes’ addresses (above) and the name they introduce themselves with, EHLO heimdall.warewave.tech.
  • Old TLS servers: a server that knows only the RSA key exchange is asked again on a new connection, the whole dialogue again (below).
  • A private location checks STARTTLS once its probe is updated. An older probe ignores the setting and makes a plain TLS handshake to the port, which fails.

Email authentication: SPF, DKIM, DMARC

A mail_auth monitor reads the records receiving mail servers read before they trust your mail — SPF, DMARC and the DKIM keys of the selectors you name — and goes down when they are broken or, if you like, when they change. Its target is the name your mail is sent from: example.com, or a subdomain such as mail.example.com.

  • SPF: the TXT record that starts v=spf1. None is none; two are a permanent error (permerror) that every receiver fails, as are a syntax error, an include of a name without an SPF record and a loop. Its include, a, mx, ptr, exists and redirect terms are followed and counted: SPF allows 10 DNS lookups, and a record that needs more is a permerror too — mail is then treated as if it had no SPF at all. [SPF_LOOKUPS] is how many it needs; lookups that find nothing may be 2.
  • DMARC: the TXT record of _dmarc.<your name>, or — for a subdomain without one — of its organisational domain (_dmarc.example.com for mail.example.com), as receivers look for it. [DMARC_POLICY] is its policy: none (reports only), quarantine, reject, or missing; a subdomain under its domain’s record takes its sp=.
  • DKIM: for each selector — the part before ._domainkey in your mail provider’s DKIM record (google for Google Workspace, selector1 and selector2 for Microsoft 365) — the key at <selector>._domainkey.<your name>: a key, revoked (an empty p=), missing, or not a usable key. Up to 5 selectors.
  • A new monitor checks every 15 minutes, as major, that SPF is valid and within its 10 lookups, that there is a DMARC record and that every selector has its key. Without conditions it is up while SPF is valid and there is a DMARC record.
  • When a record changes: “Test now” shows what was read and offers “Alert when these records change”. It adds [SPF] == … and [DMARC] == … with the records’ texts and [DKIM_KEYS] == set(…) with each selector’s key fingerprint, so a record somebody edited — or a key that was rotated — makes the monitor down. Texts compare without case and extra spaces.
  • How often: every 5 minutes to 24 hours. A resolver keeps these records for minutes (their TTL), so a check more often reads the same answer.
  • When the domain’s name servers do not answer (a server failure, no answer in time), nothing is decided: the check counts neither as up nor as down. A name that does not exist is down (“Domain not found”).
  • A private location checks it once its probe is updated; an older probe answers “unsupported monitor type”.
Email authentication conditions
[SPF_STATUS] == valid          # valid, none, permerror, temperror
[SPF_LOOKUPS] <= 10
[SPF_ALL] == -all              # -all, ~all, ?all, +all, none
[DMARC_POLICY] == reject       # none, quarantine, reject, missing
[DKIM_MISSING] == 0            # selectors without a usable key
[SPF] == v=spf1 include:_spf.google.com ~all
[DKIM_KEYS] == set(google:1a2b3c4d5e6f7a8b)

Blocklists (RBL)

Mail from an address on a DNS blocklist is refused or sent to spam by many receiving servers. An rbl monitor asks the lists below about your mail server’s address and goes down when a list that counts lists it — [LISTED_COUNT] == 0 for a new one. Its target is the mail server’s host name (mail.example.com: each check asks about its IPv4 addresses, up to four) or a public IPv4 address. Your server is never contacted; only the lists are asked.

ListCountsRemoval
UCEPROTECT level 1informational: most of its name servers do not answer (since 24 November 2026)uceprotect.net — expires on its own a week after the last spam
UCEPROTECT levels 2 and 3informational: they list whole networks (allocations, ASNs)uceprotect.net
PSBLyespsbl.org — anybody can remove an address
0spam and 0spam RBLyes0spam.org — needs an account there
0spam NBLinformational: whole /24 networks0spam.org
s5h.netyess5h.net — from the listed address itself
  • Which lists: only lists whose own terms let a commercial service ask them free of charge and without an account. Spamhaus is not among them: its lists are paid for commercial use. A list can be switched off for a monitor under “Blocklists” in the form; lists cannot be added.
  • Informational lists are shown and never make the monitor down — unless a condition names one: [LISTED_ON] != uceprotect-2. [LISTED_ON] names the lists that list the address by their ids (uceprotect-1, uceprotect-2, uceprotect-3, psbl, 0spam, 0spam-rbl, 0spam-nbl, s5h); [LISTED_COUNT] counts those that count.
  • How often: every 15 minutes at the most, hourly for a new monitor, on every plan — the lists are volunteers’ servers, and a listing comes and goes in hours.
  • When a list does not answer — it refuses the query, answers with a code it does not publish, fails or is too slow — the result shows it as “no answer” and it is never read as a listing. A listing on another list that counts still makes the monitor down. But “not listed” needs every list that counts to have answered: until they have, nothing is decided and the monitor waits for the next check. If that lasts, the monitor’s page says so: that is on Heimdall’s side (a list refusing our probes, or their resolver), and we are alerted, not you. A list that keeps refusing can be switched off for the monitor under “Blocklists”. A list that answers “listed” for every address (its test entry 127.0.0.1 is listed) is treated as not answering until it stops.
  • When the mail server’s name does not resolve: a name that does not exist or has no IPv4 address makes the monitor down (“no IPv4 address”). A name whose own DNS servers fail (SERVFAIL) decides nothing; if every region keeps seeing it, the monitor’s page says that the name’s DNS servers do not answer.
  • IPv6 addresses are not checked: of these lists only s5h.net lists them. A host name is asked about its IPv4 addresses only.
  • Our public probes ask the lists through a resolver of their own, so the lists see the probe’s address. A private location asks them through its own network’s resolver; a list may refuse the shared resolvers of large providers.
  • Alerts say which address is on which lists (“203.0.113.5 listed on PSBL, s5h.net”; with a [LISTED_ON] condition, the lists it names) and, when it is over, that it is no longer listed — or simply “Resolved”, when the monitor was changed meanwhile (a list switched off is not a delisting). 0spam’s reason for a listing is not shown: it quotes other people’s mail. A private location checks blocklists once its probe is updated.

Old TLS servers

The probes speak TLS 1.2 and 1.3 with forward secrecy (ECDHE): what a check sends cannot be read later, not even by someone who gets hold of the server’s key. A server that knows only TLS 1.2’s older RSA key exchange refuses that, and the check fails with remote error: tls: handshake failure — although browsers open the site.

  • tls monitors ask such a server again with the RSA key exchange, by themselves: they send nothing but the handshake, so there is nothing to keep secret.
  • http and keyword monitors do so only when you allow it: tick “Allow the RSA key exchange” under HTTP options (http.allow_rsa_key_exchange in the API). The request then goes without forward secrecy, its headers and body included: whoever gets the server’s key later can read what was recorded. Allow it for a server that offers nothing else — and ask its owners to turn on ECDHE.
  • The RSA key exchange is never in a check’s first handshake. It is offered only on a second connection, after the server refused the first handshake, so a server that can do better goes on doing what it does today. Somebody on the network who forges that refusal can make a TLS 1.2 server that prefers RSA take it; a TLS 1.3 server stays on TLS 1.3. Only its AES-GCM suites are offered; no CBC, 3DES or RC4.
  • A result that took it says so — “Key exchange: RSA on a connection of this check”, a redirect’s connection included. Such a check takes one refused handshake longer, and its response time includes it.
  • A private location does this once its probe is updated; an older probe ignores the setting.
  • A server that wants a client certificate refuses the handshake in the same words, and the second one too: the probes have none to show.

One answer the probes refuse although browsers take it: too many transfer encodings: ["chunked" "chunked"]. The server marked its answer as chunked twice, against the HTTP standard — some load balancers do so when they compress — and that lenience is what request smuggling lives on. Such a server usually answers correctly when nothing is compressed: give the monitor the request header Accept-Encoding: identity.

Heartbeat monitors

For cron jobs and backups, create a heartbeat monitor and call its URL at the end of each run. If no ping arrives within the expected interval plus the grace period, the monitor goes down. The grace is a fifth of the interval unless you set one — never less than a minute.

crontab
# every night at 03:00: ping when the backup succeeded, report the failure when it did not
0 3 * * * if /usr/local/bin/backup.sh; then curl -fsS -m 10 --retry 5 --retry-connrefused -o /dev/null https://heimdall.warewave.tech/hb/hb_7f3c9a2e41; else curl -fsS -m 10 --retry 5 --retry-connrefused -o /dev/null https://heimdall.warewave.tech/hb/hb_7f3c9a2e41/fail; fi
  • Let the ping retry. --retry 5 --retry-connrefused keeps trying for about half a minute, long enough to bridge a restart of Heimdall; a daily job has one chance a day to say it ran. -o /dev/null keeps cron from mailing you the answer.
  • Use if …; then …; else …; fi rather than backup.sh && curl … || curl …/fail: with the second form a failed success ping reports a failure.
  • /fail marks the monitor down at once, without waiting for the interval. A POST body (up to 200 characters) is kept as the reason.
  • A new heartbeat waits for its first ping: until then it is pending and alerts nobody, so you can create it first and wire the job later. Once the first ping is overdue, the monitor list and its page say “No first ping” in amber — the only sign of a job that was never wired up.
  • When Heimdall itself could not hear pings — while it restarted, or while its database could not take them and it answered 503 — a ping that was due then is excused: the monitor gets one more interval and grace from the moment Heimdall could hear again. A ping that was already late when that began gets only the time Heimdall was away.
A heartbeat monitor’s page: expected every 24 hours with the default grace period, its last ping and when the next one is due at the latest; next to it the heartbeat URL and the two lines for the job, one for a run that succeeded and one with /fail, each with a copy button.
A heartbeat’s page: when the next ping is due, and the lines to paste into the job. “Expected every” and “Grace period” are set side by side in the form.

Heimdall’s probes: addresses and User-Agent

If your site sits behind a firewall, a WAF, bot protection or a country block, let Heimdall’s probes through. Otherwise they are refused, and your monitor goes down while your site is up. The probes of the public regions check from these addresses:

RegionIDAddress
Istanbulist213.250.137.174
Stockholmstc51.20.35.8
Frankfurtfra52.28.243.45

An HTTP or keyword check sends this User-Agent. A User-Agent in the monitor’s own request headers replaces it. TCP, ICMP, DNS and TLS checks send none; for them only the address counts.

User-Agent
Heimdall/1.0 (+https://heimdall.warewave.tech/docs/monitors)

A TLS check with STARTTLS introduces itself to a mail server with this name. It is the only thing it says besides STARTTLS and QUIT:

EHLO
EHLO heimdall.warewave.tech

Webhooks, and every other request Heimdall’s server makes itself, come from 101.44.34.16: allow it on a webhook receiver behind a firewall. A private location checks from the network it runs in, from that machine’s own address; the addresses above are not its.

Cloudflare: add an IP Access rule with the action Allow for each address (Security → WAF → Tools). Unlike a custom rule with Skip, it keeps Bot Fight Mode from challenging the probes as well.

nginx: leave the probes out of a rate limit, and put them before a deny that would catch them (a country block, say):

nginx
# Heimdall's probes: no rate limit for them
geo $heimdall_probe {
    default 0;
    213.250.137.174  1;  # ist
    51.20.35.8       1;  # stc
    52.28.243.45     1;  # fra
}
map $heimdall_probe $limit_key {
    1 "";                       # an empty key is not counted
    0 $binary_remote_addr;
}
limit_req_zone $limit_key zone=per_ip:10m rate=10r/s;

# in a location with allow / deny rules: before the deny lines
allow 213.250.137.174;  # ist
allow 51.20.35.8;       # stc
allow 52.28.243.45;     # fra

cPanel with Imunify360 or CSF: add each address to the firewall’s white list (Imunify360 → Firewall → White List), or on the server’s command line. On shared hosting, ask your host to do it and send them this page.

Imunify360 / CSF
imunify360-agent whitelist ip add 213.250.137.174 --comment "Heimdall probe"
imunify360-agent whitelist ip add 51.20.35.8 --comment "Heimdall probe"
imunify360-agent whitelist ip add 52.28.243.45 --comment "Heimdall probe"

# or, with CSF
csf -a 213.250.137.174 "Heimdall probe"
csf -a 51.20.35.8 "Heimdall probe"
csf -a 52.28.243.45 "Heimdall probe"