> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dnzwithazee.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uptime

> Monitors, incidents and the public status page from the terminal.

These commands match **High availability → Uptime** in the dashboard. For what monitors, incidents
and the public status page do, see [Uptime and public status page](https://docs.dnzwithazee.com/dashboard/uptime.md). Not
`dnz status-page`, which switches a host to a maintenance or moved page, nor
[`dnz proxy maintenance`](https://docs.dnzwithazee.com/cli/status-pages#scheduled-maintenance), which schedules repeating
maintenance and keeps the hostnames' monitors quiet during it.

Reading needs **Manage monitoring**, **Manage proxies** or **Post incidents**; changing needs
**Manage monitoring**. **Post incidents** (the built-in **Helpdesk** role) also opens, edits and
updates incidents, without touching monitors, the public page or anything else; deleting an
incident stays with **Manage monitoring**.
Monitors are named by their name or id.

## Monitors

```bash theme={null}
dnz uptime                                   # list: state, 24h/30d/90d uptime, response time, what it checks
dnz uptime list --status down -q web --page 2   # a page of monitors, by state or a search
dnz uptime add Website --url https://www.example.com/ --keyword Welcome --public Website --group Web
dnz uptime add "App servers" --service app.example.com --interval 30
dnz uptime add Shop --url https://shop.example.com/ --from jkt-1,singapore   # from DNZ and these nodes or regions
dnz uptime edit Shop --from ""               # from DNZ only again
dnz uptime places                            # the nodes and regions it can check from
dnz uptime add Billing --url https://billing.internal/health --expect 200 --slow-ms 800 --insecure true --paused
dnz uptime show Website                      # last check, uptime 24h/7d/30d/90d, last checks, 30 days, incidents
dnz uptime check Website                     # one check now; shown, not kept
dnz uptime edit Website --confirm 3 --timeout 5
dnz uptime pause Website                     # no checks, history kept; `resume` checks it again
dnz uptime rm Website                        # with its history
```

| Option | Meaning |
| - | - |
| `--url URL` | Check this http or https URL |
| `--service HOSTNAME` | Watch the DNZ Proxy servers behind this hostname, from the nodes' health checks |
| `--method GET\|HEAD` | The request (default `GET`) |
| `--expect CODES` | Codes that pass, e.g. `200-299,301` (default 200–399) |
| `--keyword TEXT` | Text the answer must contain |
| `--slow-ms MS` | Slower answers count as degraded (0: never) |
| `--interval SECS` | Seconds between checks, 20–3600 (default 60) |
| `--timeout SECS` | Seconds a check waits (default 10) |
| `--confirm N` | Failed checks in a row before down (default 2) |
| `--insecure true` | Accept any certificate |
| `--public NAME`, `--group GROUP` | Put it on the public status page under this name and group |
| `--private` | Take it off the public status page (`edit`) |
| `--paused` | Save it paused (`add`) |

`edit` changes only the options you pass.

## Groups of routes

```bash theme={null}
dnz uptime watch ls                          # watched groups, and every group with its hostnames
dnz uptime watch add "Web app" --path /health --interval 120 --public
dnz uptime watch edit "Web app" --interval 300
dnz uptime watch rm "Web app"                # its monitors go too; --keep-monitors keeps them
```

A watched group gets a monitor per hostname of its routes, made and deleted as routes join and
leave it. `add` and `edit` take `--path`, `--expect`, `--keyword`, `--slow-ms`, `--interval`,
`--timeout`, `--confirm`, `--insecure`, `--public` / `--private` and `--public-group`.

## Incidents

```bash theme={null}
dnz uptime incidents --days 90               # open ones and the last days; --monitor Website; --page, --limit
dnz uptime incident open "Database maintenance" --impact maintenance --monitor Website -m "Planned, 22:00–23:00."
dnz uptime incident update 12 identified -m "A disk filled up; clearing it."
dnz uptime incident resolve 12 -m "All good again."
dnz uptime incident show 12                  # its timeline
dnz uptime incident rm 12
```

`open` takes `--impact` (minor, major, critical, maintenance), `--status` (investigating,
identified, monitoring, resolved), `--monitor` (repeat it for more), `-m` for the first update and
`--hidden` to keep it off the public page.

### Written afterwards

```bash theme={null}
dnz uptime incidents add "Power cut" --impact major --monitor Website --started "2026-11-01 13:04" --resolved "2026-11-01 14:31"
dnz uptime incident update 13 identified -m "The building lost power." --at "2026-11-01 13:20"   # fills in the timeline
dnz uptime incident resolve 14 --at "2026-11-01 15:10"
dnz uptime incident edit 13 --resolved "2026-11-01 14:35"      # only what you pass changes; also --title, --impact, --monitor, --started, --hidden/--shown
dnz uptime gaps                              # times DNZ wasn't checking (it was off), and what was done about each
dnz uptime incidents add "Power cut" --gap 3 --monitor Website   # the gap's times
dnz uptime gaps dismiss 3                    # no incident for it
```

`add` (or `open`) takes `--started`, `--resolved` (it is opened as resolved), `--at` (the first
update's time) and `--gap`; `update` and `resolve` take `--at`. Times are on the server's clock
(`2026-11-01 13:04`) or RFC 3339 (`2026-11-01T05:04:00Z`), never in the future, and in order:
started, the updates, resolved. See [Uptime](https://docs.dnzwithazee.com/dashboard/uptime.md#incidents-written-afterwards) for what
they count for.

## The public status page

```bash theme={null}
dnz uptime page                              # its settings and where it is
dnz uptime page set --on --title "Company status" --hostname status.example.com --incident-days 30
dnz uptime page set --off
```

For its own hostname, let DNZ make the routes and DNS record on proxies: `--proxy` names them
(repeat it or separate names with commas) and `--dnz-address` is DNZ's own address as they reach it
(its IP and the port its web UI listens on, never the page's hostname or a proxy's port; DNZ refuses
an address that doesn't answer as DNZ). They are made while the page is on and deleted when it's
turned off; a proxy left out of `--proxy` loses its route, and `--no-route` deletes them all and
keeps the hostname. Either flag alone keeps the other's saved value.

```bash theme={null}
dnz uptime page set --on --hostname status.example.com --proxy edge,edge-2 --dnz-address http://10.0.0.53:8080
dnz uptime page set --proxy edge
dnz uptime page set --no-route
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.