---
title: "Discord uptime monitoring bot, via webhook | Logdash"
description: "No Discord bot to invite: a 30-line Cloudflare Worker turns the Logdash webhook into a Discord message. The real payload, the relay code, and when Kuma wins."
url: https://logdash.io/alerts/discord
---

# Discord uptime monitoring bot

Logdash has no Discord bot, so the working setup is a Discord channel webhook fed by a 30-line Cloudflare Worker that turns the Logdash webhook alert into a Discord message.

Straight answer first. Logdash ships two alert channels, Telegram and webhook. There is no Discord integration and no bot to invite. What does exist: a webhook channel that sends a small JSON object every time a monitor changes state, and Discord channels that accept messages through a webhook URL. Put a 30-line relay between the two and you have a Discord website down alert.

Why not paste the Discord URL straight into Logdash? Discord wants a `content` or `embeds` field. Logdash sends `newStatus`, `name`, `url`, `statusCode` and `errorMessage`, so Discord rejects the request as an empty message. The relay reshapes one into the other.

One plan detail before you start. On the free Hobby plan the webhook channel sends a bare GET with no body and no headers, which tells a relay that something happened but not what. POST with the JSON body and custom headers come with Builder at $9 a month. On Hobby, Telegram is the free channel that carries the whole alert.

## The Discord webhook uptime monitor relay

 worker.js 

```javascript
// worker.js - Logdash webhook in, Discord message out.
// npx wrangler deploy worker.js --name logdash-discord \
//   --compatibility-date 2026-01-01
// npx wrangler secret put DISCORD_WEBHOOK_URL --name logdash-discord
// npx wrangler secret put RELAY_SECRET --name logdash-discord
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 ? '🔴' : '🟢';
    const lines = [
      `${icon} **${alert.name}** is ${alert.newStatus}`,
      `\`${alert.url}\``,
    ];

    if (down) {
      lines.push(
        `Status code: ${alert.statusCode}`,
        `Error: ${alert.errorMessage ?? 'N/A'}`,
      );
    }

    const sent = await fetch(env.DISCORD_WEBHOOK_URL, {
      method: 'POST',
      headers: { 'content-type': 'application/json' },
      body: JSON.stringify({
        username: 'Logdash',
        content: lines.join('\n').slice(0, 2000),
        allowed_mentions: { parse: [] },
      }),
    });

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

Three lines in there do the real work. The secret header check matters because a workers.dev URL is public, and without it anyone who finds the URL can post into your channel. `allowed_mentions` with an empty parse list stops an error page that happens to contain @everyone from pinging the whole server. The 2,000 character slice is the Discord limit for `content`, and the error body Logdash forwards can be up to 1,000 characters on its own.

One risk is specific to Cloudflare. Workers send from shared IP addresses, and Discord has rate-limited busy Cloudflare ranges before, answering 429 or error 1015\. The relay then returns 502, and Logdash does not retry. If `npx wrangler tail logdash-discord` ever shows that, run the same handler on a host with its own IP.

1. **Create the Discord webhook** Server Settings, Integrations, Webhooks, New Webhook. Pick the channel and click Copy Webhook URL. You need the Manage Webhooks permission on that channel.
2. **Deploy the relay** Run the three wrangler commands at the top of the file and paste the Discord URL and a long random secret when asked. The Cloudflare free plan allows 100,000 requests a day, and an alert channel uses a handful.
3. **Wire it and break it** In Logdash add a webhook channel with method POST, the workers.dev URL and an x-relay-secret header holding the same secret, then attach it to the monitor next to your Telegram channel. Stop the app: the next failed check posts the red message in Discord and the Telegram alert lands on your phone.

What lands in the channel: a red circle, the monitor name in bold, the URL in a code span so Discord does not unfurl a preview of your own broken site, then the status code and the error. Recovery is a green circle, the name and the URL.

## Uptime Kuma Discord vs Logdash

Kuma has Discord built in, with a choice of normal, minimalist or fully templated messages. If Discord is the only channel you care about, that is the shorter path.

### Discord alerts: Logdash vs Uptime Kuma

| Feature               | Logdash                              | Uptime Kuma                             |
| --------------------- | ------------------------------------ | --------------------------------------- |
| Discord support       | Webhook channel plus a 30-line relay | Built in, paste the webhook URL         |
| Plan needed           | Builder, $9/month, for POST          | Free, plus the server                   |
| Message format        | Whatever your relay writes           | Normal, minimalist or a custom template |
| Alert after           | The first failed check               | A configurable number of retries        |
| Where the sender runs | Hosted, outside your stack           | Your server, and it goes down with it   |
| App logs and metrics  | Same service view, eight SDKs        | Not what Kuma is for                    |

### When Uptime Kuma is the better pick

- You already run Kuma. Discord is a dropdown there, no code and no extra account.
- You want Discord alerts for $0\. Kuma does it on your own box, while the Logdash webhook only carries the alert from Builder up.
- Nobody on the team wants to own code in the alert path, even 30 lines of it.

### Is there a Discord uptime monitoring bot for Logdash? 

No. Logdash posts to Discord through a channel webhook and a small relay, not a bot account. For most uptime tools that is the same thing under the hood: Uptime Kuma also posts to Discord with a webhook URL.

### How do I get a Discord website down alert for free? 

Not with Logdash, whose free webhook sends a GET without the alert body. UptimeRobot posts to Discord on its free plan, and a self-hosted Uptime Kuma does too. On the Logdash Hobby plan the free alert channel is Telegram.

### Can a Discord webhook uptime monitor skip the relay? 

Not with Logdash. Discord needs a content or embeds field and Logdash sends its own six-field JSON, so a direct request is rejected. Tools that template the request body, like Uptime Kuma, can post to Discord without one.

### How do I set up Uptime Kuma Discord alerts? 

Add a notification in Kuma, pick Discord as the type, and paste the channel webhook URL from Server Settings, Integrations, Webhooks. Send a test, then enable it on each monitor.

## 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.

[Slack uptime monitoring](https://logdash.io/alerts/slack): 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.

[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.

[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.
