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 - 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, '&')
.replace(/</g, '<')
.replace(/>/g, '>');
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.
- 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.
- 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.
- 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.