---
title: "Slack uptime monitoring with a webhook relay | Logdash"
description: "Get a Slack message when your site goes down: the Logdash webhook, a 30-line Cloudflare Worker and a Slack incoming webhook. Plus when UptimeRobot is simpler."
url: https://logdash.io/alerts/slack
---

# Slack uptime monitoring

Logdash has no native Slack app, so Slack uptime monitoring means a Logdash webhook channel posting to a 30-line Cloudflare Worker that forwards every down and up alert to a Slack incoming webhook.

If your team lives in Slack, the website down alert should land there. Logdash does not ship a Slack app. It ships a webhook channel, and Slack ships incoming webhooks, and the two do not speak the same JSON. Slack wants a `text` field, Logdash sends `newStatus`, `name`, `url`, `statusCode` and `errorMessage`. A Cloudflare Worker in the middle translates.

The relay needs the Builder plan at $9 a month. On the free Hobby plan the webhook channel can only send a GET with no body and no headers, so the relay would learn that something changed but not which monitor or which way. Builder adds POST with the JSON body, custom headers and one-minute checks.

## The Slack downtime notification relay

 worker.js 

```javascript
// worker.js - Logdash webhook in, Slack message out.
// npx wrangler deploy worker.js --name logdash-slack \
//   --compatibility-date 2026-01-01
// npx wrangler secret put SLACK_WEBHOOK_URL --name logdash-slack
// npx wrangler secret put RELAY_SECRET --name logdash-slack
const esc = (value) =>
  String(value)
    .replace(/&/g, '&amp;')
    .replace(/</g, '&lt;')
    .replace(/>/g, '&gt;');

export default {
  async fetch(request, env) {
    const secret = request.headers.get('x-relay-secret');

    if (request.method !== 'POST' || secret !== env.RELAY_SECRET) {
      return new Response('forbidden', { status: 403 });
    }

    // { httpMonitorId, newStatus, name, url, statusCode, errorMessage? }
    const alert = await request.json();
    const down = alert.newStatus === 'down';
    const icon = down ? ':red_circle:' : ':large_green_circle:';
    let text = `${icon} *${esc(alert.name)}* is ${alert.newStatus}`;
    text += `\n${esc(alert.url)}`;

    if (down) {
      text += `\nStatus code: ${alert.statusCode}`;
      text += `\nError: ${esc(alert.errorMessage ?? 'N/A')}`;
    }

    const sent = await fetch(env.SLACK_WEBHOOK_URL, {
      method: 'POST',
      headers: { 'content-type': 'application/json' },
      body: JSON.stringify({ text }),
    });

    return new Response(null, { status: sent.ok ? 204 : 502 });
  },
};
```

The `esc` helper is not decoration. Slack treats `<`, `>` and `&` as control characters in message text, and the error Logdash forwards is the first 1,000 characters of whatever your server answered. When nginx returns its HTML 502 page, unescaped tags would mangle the message. Slack answers a good post with 200 and the body ok, which the relay passes back as 204.

Two Slack rules to know. The channel is fixed when you install the app, and the payload cannot override it, so a second channel means a second webhook URL. And a Slack website down alert is only as early as your check interval: 5 minutes on Hobby, 1 minute on Builder, 15 seconds on Pro.

1. **Create the Slack incoming webhook** Create a Slack app for your workspace, open Incoming Webhooks, switch on Activate Incoming Webhooks, click Add New Webhook to Workspace and pick the channel. Copy the hooks.slack.com URL.
2. **Deploy the relay** Run the three wrangler commands from the top of the file, pasting the Slack URL and a long random secret. The Cloudflare free plan allows 100,000 requests a day.
3. **Wire it and break it** Add a Logdash webhook channel: method POST, the workers.dev URL, header x-relay-secret with the same secret. Attach it to the monitor next to Telegram, stop the app, and the next failed check posts in Slack while the Telegram alert reaches your phone.

## What the Slack website down alert looks like

A red circle, the monitor name in bold, the URL, the status code and the error on separate lines. Recovery is a green circle with the name and URL. Add Block Kit sections in the relay if you want buttons or a link to the runbook; it is your code.

Keep Telegram on the same monitor anyway. Logdash makes one delivery attempt per alert and does not retry, so the hour your Worker or Slack has a problem is an hour of silent alerts. A second channel that runs no code of yours costs nothing.

## Uptime monitoring Slack integration: Logdash vs UptimeRobot

### Slack alerts: Logdash vs UptimeRobot

| Feature                                | Logdash                              | UptimeRobot                        |
| -------------------------------------- | ------------------------------------ | ---------------------------------- |
| Slack support                          | Webhook channel plus a 30-line relay | Built in                           |
| Cheapest plan with Slack               | Builder, $9/month                    | Solo, its cheapest paid plan       |
| Check interval on that plan            | 1 minute                             | 60 seconds                         |
| Alert after a delay, repeat while down | No, one message per state change     | Threshold and recurrence from Solo |
| Telegram alerts                        | Free on Hobby                        | From Solo                          |
| App logs and metrics                   | Same service view, eight SDKs        | Not offered                        |

### When UptimeRobot is the better pick

- Slack is the only channel that matters to your team and nobody wants to own a Worker. UptimeRobot Solo posts there with no code.
- You want to hear only after the site has been down for a few minutes, and get reminded every few minutes until it is back.
- You also need Microsoft Teams or Mattermost from the same tool. Logdash would need one relay per destination.

### Does Logdash have an uptime monitoring Slack integration? 

Not a native one. Native channels are Telegram and webhook. The webhook plus the Worker on this page gets alerts into Slack, and it needs the Builder plan because the free plan webhook cannot send a body.

### How do I get a Slack website down alert? 

Create a Slack incoming webhook, deploy the relay Worker with that URL as a secret, and add a POST webhook channel in Logdash pointing at the Worker. The first failed check after that posts in the channel.

### What does a Slack downtime notification from Logdash look like? 

Whatever the relay writes. The one above posts a red circle, the monitor name in bold, the URL, the status code and the error body, and a green circle with the name when it recovers.

### Is Slack uptime monitoring free? 

Rarely. Logdash needs Builder at $9 a month for the POST webhook, and UptimeRobot puts Slack on Solo, its cheapest paid plan, not on Free. A self-hosted Uptime Kuma posts to Slack for the cost of the server.

## Keep reading

[All alert channels](https://logdash.io/alerts): One page per channel, each with the setup, the code and what it cannot do yet.

[Website down notification email](https://logdash.io/alerts/email): Logdash does not send email alerts itself, so a website down notification email means a Logdash webhook pointed at a 30-line Cloudflare Worker that mails each down and up alert through Resend or Postmark.

[Uptime monitoring webhook](https://logdash.io/alerts/webhook): When a check flips between up and down, Logdash sends one HTTP request to your URL, and on POST, PUT or PATCH it carries a flat JSON body with the monitor id, new status, name, URL, status code and error.

[Website down alert on Telegram](https://logdash.io/alerts/telegram): Add @logdash\_uptime\_bot to a Telegram chat or group, send it the one-time passphrase Logdash shows you, and the bot posts a red-dot down message on the first failed check and a green-dot up message when the site recovers.

[Uptime monitoring](https://logdash.io/features/monitoring): HTTP checks as often as every 15 seconds. When one fails, Telegram tells you before your users do.
