Using the workspace

Watch: keeping your live systems healthy

Watch checks your live apps and servers, opens one incident per problem, fixes what you have allowed, asks you about the rest, and confirms the recovery from outside.

Watch is the part of Duscode that looks after software once it's live. It checks your systems regularly, notices when something breaks, and either fixes it within the limits you set or asks you one plain question.

Warning

Watch runs inside Duscode on your computer. It checks your systems only while Duscode is running; while your computer is asleep or switched off, nothing is checked. Each such gap is recorded and listed in your daily brief, so you always know when nobody was watching.

Coming soon

Watching while your computer is switched off, and a Watch view in the workspace where you add systems, choose access levels, write standing orders and set maintenance windows. Today Watch looks after the apps Dus deployed, you hear from it through notifications and the daily brief, and the settings below are available to Duscode's local API.

What it watches

Apps Dus deployed are watched automatically, one system per deploy target. A system Duscode didn't build can be added by its address; what Dus can't find out, he lists as questions for you ("Where does it run?").

Each system has checks, run from outside the server:

  • The address answers, quickly and without server errors.
  • The certificate isn't about to expire (a warning 14 days before).
  • The domain still points where it should.
  • The last deploy didn't fail.
  • The server has disk, memory and headroom (read-only, over the deploy key).
  • The app's log shows no known error patterns in the last 10 minutes.

A check that can't be taken (your computer is offline, say) is reported as "Can't check right now", never as "down".

What happens when something breaks

  1. Detected. Two bad readings in a row open an incident. One problem opens one incident, not a flood of alerts, and a check that keeps flipping waits until it settles.
  2. Diagnosed. Dus looks at what changed (a recent release, the logs) and says what he thinks is wrong, in plain words.
  3. Fixed, or asked. If you've allowed the fix in advance (a standing order such as "restart it if it stops answering"), Dus does it. Otherwise he asks you, with options and a recommendation.
  4. Verified. Recovery counts only when the checks pass again from outside, two readings in a row.
  5. Stops if a fix fails. A failed fix is never retried blindly: Dus stops, tells you what happened, and asks again without that option.

Is it down?

When someone says "the site is down" or "I can't log in", ask Dus in chat (or in Slack or Teams), or press Is it down? beside a system in Watch. You get one card, the same in both places:

  1. Up, degraded or down, with the evidence first. Dus checks from outside, with no access to your server: your pages, the health endpoint and the sign-in it finds in your code, one sign-in attempt with a made-up account that should be refused, the certificate and the domain. Each line shows the answer and how long it took.
  2. The likely cause. Dus reads how your project goes live (a timer that deploys every merge, a CI deploy job, Duscode's own deploys) and the recent merges, including database migrations. If one went out just before the report, it says so: "probably the deploy window from PR #212 at 14:00; it should clear within ~5 minutes", then checks again and tells you when it has cleared.
  3. What it is. An outage, a deploy blip, or one person's problem. If the site is up for everyone else, Dus asks for the exact message they see; give it and Dus finds where your app shows it and explains what it means and what to try.

The card also says what Dus couldn't look at. At Observe it never opens the server or its logs, and it doesn't try another way; at Maintain it also reads the last 10 minutes of the service log. If deploys lock people out twice in a week, a backlog item appears: "A deploy shouldn't lock users out".

What Dus may do: access levels

You choose one level per system. New systems start at Observe.

Level Dus may
Observe Check, diagnose and tell you. Nothing on the server changes.
Maintain Also follow your standing orders, and restart or roll back when you approve.
Develop Also prepare a code fix (tested and shipped like any change), and put it live when you approve.

Lowering the level takes effect at once: standing orders that need a higher level stop applying.

Maintenance windows

Planned work shouldn't page you. Set a maintenance window (up to 7 days) and Watch opens no new incidents for that system during it.

Your users

Your users, at the bottom of Watch, is a helpdesk for the people who use your product. Choose Set it up, name the sites it runs on, and paste the script tag into your product: a small Report a problem button appears. A report can include a screenshot (the browser asks the person what to share) and recent errors on their page. Dus checks whether your product is down, sorts each report and drafts a reply; nothing reaches the person until you press Send reply (it goes from the mailbox you connected). A bug goes on the Board for Dus to fix, and when the fix merges Dus drafts the “it is fixed” reply. Erase a person deletes everything they sent. Reports arrive where Duscode answers from the internet: your always-on server.

Something missing or wrong? Email support@duscode.com.