CLI command
probierz status-page build
The status page as one self-contained HTML file, for any static host.
Invocation#
probierz status-page build <APP> --days <N> --out <FILE>Required inputs and options#
<APP>is the product, asprobierz apps listnames 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.--out <FILE>is the HTML file to write, in a directory that exists.
Output and state effects#
Composes the page as show does, writes it to --out as one HTML file with no script and nothing fetched, so it reads the same served from anywhere, and prints {written, page}. 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.
Exact refusals#
out-unwritable(exit 1): the file cannot be written where--outnames it (its directory is missing, or this user may not write there); the operating system's answer is quoted and no page is written.- The refusals of
status-page show. - 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. runprobierz 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 withprobierz 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. rungit -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 adoptorprobierz author manifestwrite it), or name an appprobierz apps listlists.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, withgit 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 appprobierz apps listlists.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 checknames 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}. declareappId: {app}in {file}, or rename the file for the app it declares withgit 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 withprobierz 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 manifeststatusPage: {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 withnameandstatus), 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, asprobierz 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.