Fleet
On this page
Fleet helps you run the infrastructure behind your apps. It shows every host and its workloads, and runs patching, failover and disaster recovery drills with a full audit trail.
Turn on Fleet#
Every workspace has Fleet, and you don't need an activation key. Inventory, monitoring, health checks, alerts and the audit log work on every plan. Rolling patches, maintenance windows, failover, disaster recovery drills and audit log export need the Business or Enterprise plan.
Try Business for 14 days#
A Free workspace can try Business once, with no card: choose Start 14-day trial on the Fleet page, Try Business free for 14 days on any locked Fleet screen, or Try free for 14 days in Settings → Billing → Plans. The trial goes on the workspace you're in, and only owners and admins can start it.
Before it ends, choose how to keep Business in Settings → Billing:
- Pay by card: Dokwe checks the card with ₦50 and refunds it, and Paystack charges ₦60,000 a month or ₦600,000 a year from the day the trial ends. Cancel before then and nothing is charged.
- Pay by invoice: a yearly invoice for ₦600,000, paid by card, bank transfer or USSD, or by transfer to the account on the invoice. Your year starts when the trial ends.
If neither is done, the workspace goes back to Free when the trial ends. Servers keep running and reporting, and schedules, past runs and drill reports are kept. Starting new patch runs, failovers and drills is locked again, but a run that was going can still be resumed or stopped, and past runs and reports stay viewable.
Each host has to send Fleet data, though:
- New servers send Fleet data by default, because the install command from bring your own server includes
--enable-fleet. - To change this for an existing server, use the Fleet toggle on its page in Servers. The agent updates its config and restarts.
To see Fleet, a workspace member needs a Fleet role. Workspace admins can see it even without one.
Roles#
Admins give each member a workspace-wide Fleet role, separate from their app role. See team roles.
| Role | Can do |
|---|---|
none | No Fleet access. This is the default. |
fleet-viewer | View everything in Fleet. |
fleet-operator | Everything a viewer can, plus manage hosts and clusters and run drills. |
fleet-admin | Everything an operator can, plus start failovers, manage webhooks and secrets, and export the audit log. |
Hosts, sites, clusters and workloads#
- Hosts are the machines running the Dokwe agent. You don't add them by hand: a host appears when its agent first sends Fleet data. Each host reports its OS, hardware, agent version and uptime. A host is marked offline after 90 seconds without contact.
- Sites are named locations, such as a data center or office, with an optional description.
- Clusters are named groups of hosts that act together. A cluster has a role of
primary,standbyorsharedand can belong to a site. - Workloads are the things running on a host. These include containers, systemd and Windows services, IIS sites, and scheduled tasks. The agent finds them, or you can register them yourself, and you can start, stop, restart or deploy them.
Health checks#
The agent runs checks on the host and reports results. A check can be tcp, http, command, file or log.
A check targets a host or a whole cluster. It runs every 60 seconds by default, and you can set anything from 10 seconds to 1 day. You can also set a timeout of 1 to 120 seconds (10 by default) and up to 5 retries.
Alerts#
An alert rule fires on one of two things:
- A metric. CPU, memory or disk percentage crosses a threshold you set.
- A failing check. A check fails a set number of times in a row.
Each rule has a severity (info, warning or critical) and a cooldown between 60 seconds and 1 day, with a default of 15 minutes. A rule can watch a host, a cluster or the whole workspace.
Alerts are delivered to the channels you add: Slack, a webhook, or email over SMTP. Webhook channels can sign each request with an X-Dokwe-Signature header.
Maintenance windows#
A maintenance window covers a host, a cluster or the whole workspace for a set time, with a reason. Alerts that fire during the window are still recorded, but they're marked as suppressed and aren't sent.
Cordon and drain#
- Cordon a host to mark it as out of service. Uncordon it to bring it back.
- Drain cordons the host and records when draining started. It doesn't move workloads off the host for you, so stop or move them yourself.
Rolling patches#
A patch run updates one cluster, one host at a time. For each host, Fleet cordons it, runs your patch command through the agent, waits up to 5 minutes for the host's checks to pass, and then uncordons it.
If a host fails, the run pauses so you can look into it, then resume or abort. A cluster can only have one patch run going at a time.
Failover#
A failover moves work from one cluster to another. To confirm, you type the source cluster's name. Fleet then drains the source, checks the target, optionally updates DNS through a DNS adapter (Cloudflare, Route 53 or your own script), swaps the two clusters' roles, and checks again.
You can abort a failover while it's running.
DR drills#
A DR drill runs a failover as a rehearsal and records how it went. You can set a recovery point objective (RPO) and choose synthetic checks to run.
Each drill produces a report you can download as JSON or PDF. The report is signed with an HMAC-SHA256 key unique to your workspace. To confirm a report hasn't been changed, use the verify action.
Automatic DNS failback after a drill isn't available yet.
Audit trail#
Fleet logs every operator action, with who, from what IP, on what, and why. You can filter the log by time and export it as CSV. Exporting needs the fleet-admin role.
Webhooks#
Webhooks send Fleet events to your own systems. Each request includes these headers:
X-Dokwe-Signature: sha256=<hex>: an HMAC-SHA256 of the request body, made with your webhook secretX-Dokwe-Event-TypeX-Dokwe-Delivery-Id
Dokwe generates a secret if you don't set one. Each delivery is tried up to 4 times, and every attempt shows in the delivery history.
Events cover host changes (such as host.registered and host.cordoned), cluster health (cluster.degraded, cluster.recovered), patch results, and failover and drill progress (such as failover.started and drill.completed).
Fleet from the CLI#
The CLI can show you Fleet data, but it can't make changes:
dokwe fleet list --status online
dokwe fleet describe <host-id-or-hostname>
dokwe fleet workloads --host <host> --json