
How to get a screenshot in Slack when your website looks broken
How to Get a Screenshot in Slack When Your Website Looks Broken Uptime monitors like Pingdom and Better Uptime check that your server responds with a 200. They don't check whether the page actually renders correctly — a React app that crashes on load, a blank white screen from a failed API call, or a CSS file that didn't deploy all return HTTP 200. Here's how to add a screenshot to every alert: when your monitor fires, capture what the page actually looks like and attach it to the Slack message. The pattern monitor fires webhook → take screenshot → upload to Slack → post alert with image Receive the webhook and post with screenshot import express from " express " ; import { WebClient } from " @slack/web-api " ; import fs from " fs/promises " ; import path from " path " ; import os from " os " ; const app = express (); app . use ( express . json ()); const slack = new WebClient ( process . env . SLACK_BOT_TOKEN ); const ALERT_CHANNEL = process . env . SLACK_ALERT_CHANNEL ; // e.g. "#inc
Continue reading on Dev.to DevOps
Opens in a new tab

