·5 min read
ByGabriel CA·Kraftwire Software

How do you set up website uptime monitoring with Slack alerts?

Illustration for How do you set up website uptime monitoring with Slack alerts?

A false uptime alert says a site is down while it is still up. UptimeRobot lists dropped links, DNS timeouts, and busy network routes as common causes.1

UptimeRobot checks failures again before it sends a down alert. This covers timeouts, network errors, and error status codes from the site.1 First, ask how the tool proves a failure before you design its Slack alert.

How do synthetic monitors confirm a website outage?

Datadog runs its synthetic checks on a set schedule, with fast retries if set. It then groups results from test sites and checks failures over time against alert rules.2

UptimeRobot rechecks within seconds from a different data center, picked at random in the same region. It sends a down alert only when those rechecks show the failure is real. It checks timeouts, network and DNS errors, error status codes, and failed keyword or assertion tests.1

Uptime Monitor’s fail threshold sets how many checks must fail in a row before an alert. It suggests two or three failed checks for most services, not just one. For services with known faults that come and go, it suggests four or more.3

Ask each vendor whether retries count toward the fail threshold or act as a separate step. Ask which status codes, timeouts, and checks of the site's reply count as failures. Keep those answers in your tool review; do not assume each tool works the same way.

Which check frequency and location rules should you choose?

Uptime Monitor suggests checks every 10-30 seconds for critical services that need the fastest checks. For important live services, its guide suggests a check once each minute.3

For standard services, Uptime Monitor suggests checks every two to five minutes. It suggests five to 15 minutes for low-priority services, such as staff tools and docs.3 Use these as a starting point, then set the check rate for each service.

UptimeRobot's multi-location checks reach one endpoint from up to four regions to catch local outages.1 Ask for both a same-region recheck and the list of regions each monitor can check.

Compare how the tools check failures, not just how often they run a test. Use these points to ask each vendor to walk through the settings you need.

  • Datadog: Scheduled tests, optional fast retries, results combined across locations, and failure evaluation over time.2
  • Uptime Monitor: Consecutive-failure thresholds, with two or three recommended for most services.3
  • UptimeRobot: Rechecks within seconds from another data center in the same region.1
  • UptimeRobot regional coverage: A single monitor checks from up to four regions.1

Ask what the rule does when one region fails but the rest still pass. Request a worked example for both a brief network fault and a long outage. Ask how long it takes from the first failed check to an alert in Slack.

What should a Slack outage payload contain?

Slack needs text as the main message body if you do not use blocks. With blocks, Slack suggests text as a fallback for alerts, but does not require it.4

The blocks list holds layout blocks; Slack suggests these in place of legacy attachments. You can add thread_ts with the ID of a message outside a thread to reply to it.4

Put the service name, state, and fault found by the check in the fallback text. In your layout, add the regions hit, check time, owner, and link to a fix guide.

For a hypothetical checkout outage, save this plain-text payload as outage.json. Before you send it, replace the sample service and fault with what your monitor found.

{
  "text": "CRITICAL: Checkout unavailable. Confirmed HTTP 503. Owner: commerce on-call."
}

A Slack incoming webhook posts a message when you send an HTTP POST to its URL. To send this sample, set SLACK_WEBHOOK_URL to your webhook URL and run this command.4

curl -X POST \
  -H 'Content-Type: application/json' \
  --data @outage.json \
  "$SLACK_WEBHOOK_URL"

To post in a thread, put the first unthreaded message's ID in thread_ts.4 Before you use threads, ask how your Slack link gets and saves that ID. Keep later notes for the same outage in the thread of that saved message.

Slack messages can use interactive Block Kit parts to get input from users. Slack sends Block Kit action events when users act on those parts.5 If you want a button to claim an alert, ask how the app handles that action.

How should you route alerts and keep channels quiet?

Uptime Monitor suggests PagerDuty or incident.io for critical alerts, and Slack for important ones. For alerts that just share news, its guide suggests sending an email.3 Choose where each alert should go based on how urgent it is.

Each Slack incoming webhook URL is tied to one specific chat or channel.4 The incoming-webhook scope turns on webhooks and shows a channel picker in OAuth setup.6 Plan which channel gets each alert before you link the monitor to Slack.

PagerDuty's Slack link puts incident updates in threads by default to cut channel noise. Its cards can show fault details to response teams and impact and status to stakeholders, based on channel type.7

In a hypothetical routing plan, send checkout outage alerts to #commerce-incidents for the team that owns it. Put later checks and notes on the fix in that alert's thread. Use a separate news channel for short notes on impact and status.

Before launch, run a planned alert test against a test endpoint you own. Check the fail rule, target channel, fallback text, and thread behavior in that test. Test what happens when the site comes back up, and note any rules still unspecified.

Sources

  1. uptimerobot.com › false-alerts
  2. docs.datadoghq.com › how-synthetics-monitors-trigger-alerts
  3. uptime-monitor.io › best-practices
  4. api.slack.com › messaging
  5. api.slack.com › interactive-messages
  6. api.slack.com › incoming-webhook
  7. support.pagerduty.com › changelog

Is your app secure? Run a free security scan in 30 seconds · free account required.

Scan your app free →