How Upstat decides that a service is down
One failed check is not an outage yet. Upstat checks your target at a regular interval, evaluates the results on its own side and declares DOWN only according to the rules you set. Here is the whole process, step by step.
The scheduler creates a check job at the configured interval. The checker daemon leases the job and runs the check against the monitored target, for example a URL. The daemon posts the result, meaning status and latency, back to Upstat. Upstat, on the Laravel side, decides whether the monitor is UP or DOWN.
From the interval to a stored result
-
You set a target and an interval
- You configure
- For a monitor you set the target, the
check intervaland thetimeout. For a website you also add the expected status code (expected status) and, if needed, a word that must appear in the response. - Upstat does
- The scheduler creates a check job every time the interval elapses.
Shortest check interval by plan
- Hobby: 2 min
- Starter: 1 min
- Pro: 30 s
-
The daemon runs the check
- Upstat does
- The checker daemon leases the job, runs it against the target and sends the result back to Upstat. For a website it resolves the domain, sends an HTTP request with your timeout, measures latency and compares the status code. Docker container and database checks are run locally by the Connect agent on your side, which returns the result.
- Exception
- A heartbeat monitor is not checked by the daemon. Your service sends a signal to Upstat and the scheduler watches whether it arrived within the expected interval plus a margin. When it does not, the monitor is marked DOWN directly, without waiting for the confirmation described in the next step.
-
The result is stored
- Upstat does
- Upstat records whether the check passed, the status code, the latency and, on failure, an error code such as
timeout,dns,tls,connectorassertion_failed. - You see
- The monitor detail shows a latency chart and a list of checks. Your plan determines how long history is kept.
This evaluation has two states: UP and DOWN. The settings consecutive_failures, min_down_seconds and min_up_seconds decide when the state changes, there is no intermediate state. Blip scenario: one check fails, the next one passes, the monitor stays UP the whole time and no incident is opened. Sustained outage scenario: three checks in a row fail and at least 2 minutes have passed since the first failure, so both consecutive_failures and min_down_seconds are met. The monitor goes DOWN and an incident opens. After recovery it stays DOWN until min_up_seconds have passed since the last failed check, even though checks already pass. Then it returns to UP and the incident closes.
From a result to an incident
-
Upstat confirms the outage
- You configure
- In the monitor settings you choose
consecutive_failures(how many failures in a row) andmin_down_seconds(how long the error state must last). - Upstat does
- The monitor goes DOWN only when every condition you set is met. If a later check passes first, the monitor stays UP, no incident is opened and nothing is sent. The failed check remains in the check log.
- You see
- A short blip raises no alarm. DOWN means a confirmed outage.
-
Returning to UP is confirmed too
- You configure
- You set
min_up_seconds. - Upstat does
- The time is counted from the last failed check. Until it elapses the monitor stays DOWN, even though checks already pass. This protects against flapping between states.
-
An incident opens and closes
- You configure
- You add status updates to an incident manually, in the order Investigating, Identified, Monitoring, Resolved. You can assign an incident to a status page and pick the affected components, and then your customers see it.
- Upstat does
- When a monitor goes DOWN, Upstat opens an incident with the status "Investigating" by itself. When the monitor returns to UP, it closes the incident as resolved automatically.
Common questions about checks
- Who decides whether a monitor is UP or DOWN, the daemon or Upstat?
- Upstat. The daemon runs the check and sends the result. Upstat evaluates the transitions between UP and DOWN and the opening and closing of incidents on its own side.
- What happens when a single check fails?
- The failure is stored in the check log. Whether the monitor switches to DOWN depends on the consecutive_failures and min_down_seconds settings. If a later check passes before the conditions are met, the monitor stays UP and no incident is opened.
- How is a heartbeat checked?
- Your service sends a signal to Upstat. The daemon does not check it, the Upstat scheduler watches whether the signal arrived within the expected interval plus a margin. When it does not, the monitor is marked DOWN.
What happens after a state change
A state change triggers the evaluation of alert rules: who learns about the outage, through which channel and after how long. We walk through it on a rule for a single monitor.