When something breaks
Mark deploys and read History
Add one line to the end of your deploy. From then on, every chart shows when each version went out, and History lists it beside everything else that happened.
Mark a deploy
Section titled “Mark a deploy”At the end of your deploy, run:
kiyesi deploy --app checkout-api --version 3.8.1Kiyesi records the app, the version and who shipped it. Who shipped it comes from your CI system (GitHub Actions, GitLab, Bitbucket, CircleCI, Buildkite or Drone), then the latest commit’s author, or --by "Ada Obi".
There are three ways to run the command, and a fourth needs none:
On the server itself
Section titled “On the server itself”If the deploy runs on a connected server, kiyesi deploy uses that server’s own token. Nothing else to set up.
From CI, with a deploy token
Section titled “From CI, with a deploy token”In the dashboard, open Settings, Deploy tokens, give the token a name, type a fresh authenticator code, and choose Make a token. It is shown once: save it in your CI as the secret KIYESI_DEPLOY_TOKEN. A deploy token can only mark deploys and ask whether it is safe to deploy (preflight). It can mark deploys only on what its maker can see. A token made by someone limited to some projects marks deploys of those projects and environments alone, and must name the project or server.
Then name the server, or the project when a deploy goes to several servers:
kiyesi deploy --app web --version "$GIT_SHA" --server web-prodkiyesi deploy --app web --version "$GIT_SHA" --project Storefront --env productionFrom your laptop
Section titled “From your laptop”After kiyesi login, name the server: kiyesi deploy --app web --version 1.4.0 --server web-prod. It needs Act on history and deploys: the Owner and Admin roles, or a role you made with it.
From the platform itself
Section titled “From the platform itself”An app on Render, Heroku, Railway, Vercel or Netlify needs no command: the platform tells Kiyesi when each deploy succeeds, through the deploy address of its platform link. Each notice is marked once, however often the platform sends it, and checked against the platform’s signing secret when you give one. A GitHub deployment_status webhook works the same way.
A deploy token in GitHub Actions
Section titled “A deploy token in GitHub Actions”With kiyesi on the runner, installed as on the quick start:
- name: Mark the deploy in Kiyesi env: KIYESI_DEPLOY_TOKEN: ${{ secrets.KIYESI_DEPLOY_TOKEN }} run: kiyesi deploy --app checkout-api --version "${{ github.sha }}" --server checkout-api-prodHistory
Section titled “History”In the dashboard, open History. Everything that happened, newest first, grouped by day, for the last 90 days:
- deploys, with the version and who shipped it;
- new critical findings, and fixed ones;
- grade changes;
- container restarts, new images and processes killed for memory;
- servers that stopped reporting and came back;
- sites that stopped answering and came back;
- incidents opened and fixed;
- scheduled jobs that failed, were missed or ran long;
- each deploy’s verdict;
- servers disconnected, deleted and restored, and who did it.
Filter by time, server and kind. In a terminal:
kiyesi history --since yesterdaykiyesi history --server checkout-api-prod --since 7dkiyesi deploysEach person sees only the servers and projects their role lets them see.
A deploy marked by mistake
Section titled “A deploy marked by mistake”Open All deploys of the last 30 days on the Latest deploy card and choose Remove (marked by mistake). The marker, its verdict, its lines in History and a roll-back alert it raised all go; the activity log keeps who removed it. It needs Manage on history and deploys: the Owner and Admin roles.
kiyesi deploys remove checkout-api 3.8.1-oopsThe verdict after each deploy
Section titled “The verdict after each deploy”Kiyesi watches each deploy for 10 minutes after it goes out, compares those minutes with the hour before, and says healthy or roll back, with the evidence:
| What it looks at | It says roll back when, after the deploy, |
|---|---|
| Failed requests | at least doubled and reached 2% of requests, with at least 10 failures |
| Response time | the slowest 5% of responses (p95) at least doubled and passed 500 ms |
| Restarts | the app restarted again and again, or was killed for using too much memory |
| Memory | reached 95% or more, from below 90% before |
| Browser errors | 10 or more on the new version, at three times the rate before. Only for a frontend with the same name as the app |
| Incidents | an incident opened whose source is this deploy or the frontend |
With no requests and no errors to compare, it says not enough to judge rather than guess. When the app is a container, it is judged on its own restarts and memory, on the requests that name no site, and on the requests to the sites it serves; another site’s failures never count against it. A healthy verdict names the server’s sites that are linked to no container, whose requests it could not judge. Restarts in the first 3 minutes are the deploy itself and do not count. When the same app is deployed again within the 10 minutes, the first deploy is watched only until the second; if that is under 3 minutes, its verdict says it was replaced before it could be judged.
The verdict shows on History’s Latest deploy card, as a line in History, and in kiyesi deploys. A roll back also sends an alert with the command to roll back, built from the version deployed before it, such as IMAGE_TAG=2.13.4 docker compose up -d storefront-web. The alert closes when a later deploy of the same app is healthy.
Which container serves which site
Section titled “Which container serves which site”From agent 0.46.0, Kiyesi reads which container serves each site from the web server in front of it. It only reads, and changes nothing:
- Traefik: the
traefik.http.routers.<name>.rulelabels on a container, such asHost(`shop.example.com`) || Host(`www.shop.example.com`). The container with the label serves those sites. - caddy-docker-proxy: the
caddylabel on a container, such ascaddy=shop.example.combesidecaddy.reverse_proxy={{upstreams 8080}}. - Caddy: its live settings, read from its admin address on the server itself (
127.0.0.1:2019), or else its Caddyfile (/etc/caddy/Caddyfile, or one mounted into a Caddy container). Each site’sreverse_proxyaddress is matched to a container. - nginx: each
server_nameand itsproxy_pass, throughupstreamblocks, in/etc/nginx/nginx.conf,conf.dandsites-enabled.
An address such as api:3000 is matched to the container of that name, Compose service or network alias. An address on the server itself, such as localhost:3000, is matched to the container that publishes port 3000. An address that matches no container is left out.
On the server’s page, Sites and the container that serves them lists each site with its container and where the link came from: Read from Traefik, Read from Caddy, Read from nginx, or Set by your team. When a link is wrong or missing, choose Change beside the site, then a container, or Not served by a container here. A link set by your team is used instead of the one Kiyesi reads, until you choose Remove. Changing a link needs Manage on Servers and findings, and each change is in the activity log. The API is PUT /v1/servers/<id>/site-links with {"site": "shop.example.com", "container": "checkout-api"}; "container": null removes your team’s link.
Safe to deploy?
Section titled “Safe to deploy?”Before a deploy, Kiyesi checks six things it already knows about the server and answers go or wait, with what to do first:
| Check | Waits when |
|---|---|
| Memory | 90% or more is used, or the app was killed for using too much memory on the latest scan |
| Disk | 90% or more is used |
| Backup | The backup check found anything: no backup set up, none written, older than expected, would not restore, or much smaller than the last |
| Certificate | A certificate has expired (critical). One about to expire is shown, but does not make it wait |
| Open incident | An incident on this server is not fixed |
| Last deploy | Its verdict was roll back |
A server that sent no memory or disk figures in the last 5 minutes makes it wait: it may be down or full. Anything else not known, such as a server not scanned yet, never does. It only advises: it never stops a deploy by itself. On History, Before the next deploy shows the answer for any server. In a terminal, or in a pipeline before the deploy step:
kiyesi preflight checkout-api-prodIt exits with 0 for go and 1 for wait. In CI, set KIYESI_DEPLOY_TOKEN: a deploy token may ask about any server in its team, and gets the answer and its reasons, nothing more. Run on a connected server with no name, it checks that server.