CLI command

probierz status-page show

The status page's content as JSON.

Invocation#

Shell
probierz status-page show <APP> --days <N>

Required inputs and options#

  • <APP> is the product, as probierz apps list names it.
  • --days <N> is the window, a whole number of days above zero counted back from now; it is required, so no page silently covers a span nobody chose.

Output and state effects#

Reads the product's manifest and every run recorded under the harness in the window, and prints {appId, generatedAt, windowDays, since, availabilityTarget, state, journeys}. Each journey of the manifest: state (operational when its newest counted run worked, down when it failed for the product, unknown with no counted run), availability (runs that worked over runs that worked or failed for the product; null when none counted), meetsTarget (whether availability is at least this instance's status-page.availability, a share from 0 to 1; null with no target set or no counted run), runs, worked, down, notCounted (runs that failed for a host, data or an unknown cause, blocked or canceled, which never count against the product), p50Ms and p95Ms of the runs that worked, and incidents, each from the first run that failed for the product to the run that worked after it (endedAt and minutes null while it is open). The journey's words are its manifest value. The page as a whole is down when any journey is, unknown when every one is, and states availabilityTarget. No run id, error, evidence path or revision is in it. Nothing is written. The same share is an alarm when status-page.alarm-days is set too: after every run, each journey it carried is held to status-page.availability over that many days back; below it, the defect availability:<journey> opens (apart from the red run's own defect, so it stays open while the share is short even after the journey is green again) and pages through Stado's alert channels when the journey is critical; back at the target it closes. The run's afterRun.availability says what was held, or which key is missing, and probierz report shows the defect at each journey as availabilityDefect. Real test: tests/statuspage/alarm.rs.

Exact refusals#

  • A product whose manifest cannot be found or read is refused as probierz app show refuses it; a run history that cannot be read is refused naming its file.
  • --days 0 or a value that is not a whole number is refused by the parser with exit 2.
  • target-invalid (exit 1): status-page.availability is above 1, which no journey could meet; no page is composed.
  • Real test: tests/statuspage/page.rs.

Declared refusals#

What probierz refusals list declares for this command at revision d2cd6156e8b8dc6204dab7b46ec0b34b2bb03cea (probierz 0.1.7 (revision unknown, not built from a git checkout)): each cause's id, the operation declaring it, its exit status and code, and its remedy.

  • workspace-unset (probierz.manifest.discover, exit 1, config): finding the repositories that hold product manifests: this instance names no workspace, so there is no directory of repositories to look in. run probierz config set workspace <directory holding one checkout per repository>.
  • workspace-unreadable (probierz.manifest.discover, exit 1, config): listing {workspace}: the operating system would not list it: {error}. give this user read permission on {workspace}, or set another workspace with probierz config set workspace.
  • listing-failed (probierz.manifest.discover, exit 1, config): asking the git of {repository} which manifests it tracks: {cause}. make {repository} a git repository this user can read.
  • untracked (probierz.manifest.discover, exit 1, config): reading the manifests of {repository}: {file} is not tracked by the repository's git, so no other host and no review sees it. run git -C {repository} add {relative} and commit it, or remove the file.
  • duplicate (probierz.manifest.discover, exit 1, config): finding the manifest of {app}: two repositories declare {app}: {first} and {second}. keep the manifest of {app} in the product's own repository and remove the other.
  • not-found (probierz.manifest.discover, exit 1, config): finding the manifest of {app}: no repository under {workspace} has .probierz/{app}.yaml. add .probierz/{app}.yaml to the product's repository (probierz project adopt or probierz author manifest write it), or name an app probierz apps list lists.
  • file-name-invalid (probierz.manifest.discover, exit 1, config): finding the manifests of {repository}: {file} names app "{app}", which is not an id: letters, digits, '.', '_' and '-', starting with a letter or digit. rename it .probierz/<appId>.yaml with the id it declares, with git mv.
  • repository-name-invalid (probierz.manifest.discover, exit 1, config): finding repository "{name}" in the workspace: a manifest names a checkout directly under the workspace, and "{name}" would name another place. name the checkout by its directory name under the workspace in repositories[].repository.
  • app-id-invalid (probierz.manifest.load, exit 2, refused): naming an app: "{app}" is not an id: letters, digits, '.', '_' and '-', starting with a letter or digit. name an app probierz apps list lists.
  • manifest-unreadable (probierz.manifest.load, exit 1, config): reading {file}: {error}. write {file} as YAML the reader accepts (its line and column are named), then load it again.
  • manifest-invalid (probierz.manifest.load, exit 1, config): judging {file}: {problem}. fix the declaration in {file}; probierz app check names every problem it has with the world once it loads.
  • manifest-id-mismatch (probierz.manifest.load, exit 1, config): loading the manifest of {app}: {file} is named for {app} and declares appId {declared}. declare appId: {app} in {file}, or rename the file for the app it declares with git mv.
  • target-invalid (probierz.status-page, exit 1, config): reading this instance's availability target: status-page.availability is {target}, and a share of runs is at most 1, so no journey could meet it. set it to a share from 0 to 1 with probierz config set status-page.availability 0.99, or unset it.
  • out-unwritable (probierz.status-page, exit 1, config): writing the status page to {out}: {error}. name with --out a file in a directory that exists and this user may write.
  • page-undeclared (probierz.status-page, exit 1, config): reading where {app} publishes its status page: {problem}. declare in the product's manifest statusPage: {url: <its /api/v2/summary.json>, components: {<journey>: <component name>}}.
  • page-unanswered (probierz.status-page, exit 69, infra_down): reading the product's status page {url}: {problem}. check that this machine reaches the page and that it serves the Statuspage summary (components, each with name and status), then ask again.
  • journey-undeclared (probierz.status-page, exit 1, config): holding the journey {journey} of {app} against its status page: statusPage.components names {journey}, which the manifest declares as no journey. map a journey the manifest declares, as probierz app show {app} lists them.
  • component-missing (probierz.status-page, exit 1, config): finding the component {component} on {url}: the page lists no component of that name; it lists {components}. map the journey to a component the page lists, by its name as the page writes it.
  • outage-hidden (probierz.status-page, exit 1, refused): holding {app}'s status page {url} to what its journeys did: the page says operational where Probierz saw the product down: {hidden}. post the outage on the product's status page, or fix the product so its journeys work again.
  • incident-unreported (probierz.status-page, exit 1, refused): holding {app}'s incident history {url} to what its journeys did: Probierz saw the product down where the history posts no incident for its component: {unreported}. post the incident on the product's status page for that component and time, so its history says what its customers met.
  • publish-undeclared (probierz.status-page, exit 1, config): reading how {app} publishes its status page: its manifest's statusPage.publish {problem}. declare the product's own command that puts the page where its customers read it: statusPage: {publish: {command: <program>, args: [...]}}; it finds the page in PROBIERZ_STATUS_PAGE.
  • publish-failed (probierz.status-page, exit 1, refused): publishing {app}'s status page with {command}: {why}. make the product's publish command reach where the page is served, then publish again.

Source snapshot#

Generated from the Rust binaries at revision 99a74945a3598a8d73b6c6cbe5aae4f283becea3 of Probierz's private source repository.

Combined help SHA-256: 77529678a61237f774b59e76df0d1907cb749ef5da56d2ed913b040793b7d30b; binary SHA-256: be9e0eaff0e6ea50403a0c6f6d467697a4eac676f9523b8dc13a596d2b5526c5.