跳到正文
DEV Community· AccessDossier·· 32 分鐘前AI 評分38

如何在客戶發現之前得知其網站故障

How to find out a client site is down before the client does

AI 導讀

文章建議以外部監測提早發現客戶網站故障,並透過每分鐘檢查、確認後再告警及檢查頁面內容,避免只依賴伺服器狀態碼。告警應先發送給代理機構,由負責人確認情況後通知客戶,並記錄故障經過。AccessDossier Care 每分鐘檢查客戶網站並以電郵通知代理機構,最多 3 個客戶網站可免費使用,無須註冊。

正文

The worst way to learn a client site is down is an email from the client. By then they have lost visitors, maybe sales, and some trust in you. The fix is not hard, but it takes a few deliberate choices.

Check from outside, not from the server

A site can look fine from inside its own server and still be unreachable for everyone else. DNS, a firewall rule, an expired certificate or a CDN problem all fail outside the box. So the check has to run from somewhere else on the internet, the way a visitor arrives.

Check often enough to beat the client

If you check every 15 minutes, a client who opens their site 2 minutes after it fails finds out first. Short intervals close that gap. Checking every minute is a sensible default for client sites that matter to someone's business.

Check that the page works, not only that it answers

A web server can answer with "200 OK" while the page is broken. WordPress, for example, can return a page that only says "There has been a critical error on this website." A blank white screen can also come back as a normal answer. So check for something that should be on the page, such as the site's name or a phrase from the footer.

  • Ask for the home page and one page that matters, such as the shop or the contact form.
  • Look for a word or phrase that is only there when the page rendered properly.
  • Treat a very slow answer as a problem too, not only a missing one.

Confirm before you raise the alarm

A single failed check is often the network, not the site. Before alerting, check again, ideally from a second location. You want an alert you trust, because an alert that cries wolf gets muted, and a muted alert is the same as no alert.

Send the alert to the agenc y, not the client

The alert should reach whoever can fix it, fast: an email, a chat channel or a phone notification for the person on duty. The client should hear from you, in your words, once you know what happened. A second message when the site is back, with how long it was down, closes the loop and gives you a record.

Watch the slow failures too

Some outages are scheduled in advance and simply forgotten.

  1. SSL certificates. When one expires, browsers show a full-page warning and most visitors leave. Get a warning weeks before, not on the day.
  2. Domain names. An expired domain takes the whole site and its email with it. Note who owns the registrar account, and get a warning well ahead.
  3. Plugin and theme updates. An update can break a page without taking the site down. Check the key pages after updates run.

Write down what happened

Keep a short log for each incident: when it started, when you noticed, what caused it and when it was fixed. Over a few months the log shows which sites, hosts or plugins cause the most trouble. It also gives you an honest answer when a client asks how their site has been doing.

A short checklist

  • An outside check on every client site, every minute.
  • A content check, not only a status code.
  • A second check before any alert.
  • Alerts to the agency, then a message to the client from you.
  • Warnings for SSL and domain expiry, weeks ahead.
  • A short log of every incident.

This is the job AccessDossier Care is built for: it checks every client site every minute and emails the agency, not the client. It is free for 3 client sites (pricing). The free live check works today, with no sign-up.


Originally published on accessdossier.com. We make AccessDossier Care, and we write with AI help.

來源:DEV Community · dev.to