On this page

How the operator is asked

Every page Stado sends — a Weles run waiting for a phone approval, a failed release, a host that went quiet — goes through the channels the operator chose, in the order he chose them. The choice is one record for the whole fleet, the registry's operator_contact, not a setting on each host: before it, each host paged through whatever its own config file said, and nothing anywhere said how the operator wants to be reached.

Choose how you are asked

stado alerts preferences set --channel skrzynka
stado alerts preferences show

set replaces the choice with the channels it is given, first preferred first: --channel skrzynka --channel slack reaches the operator by e-mail and then on Slack. The channels are slack, telegram, sendgrid, skrzynka, most (SMS) and gcp-pubsub. show --json prints {"channels": [...]}.

A choice is only the route. Each channel still needs its material: Twilio's fields in the twilio item for most, a Slack webhook in the alerts item, and so on. These are read through the selected credential store: Skarbiec with Stado's own grant, or, on a machine without Skarbiec, the owner-only file store STADO_CREDENTIALS_STORE=file://<path> selects (persisted as credentials.store), which stado credentials put fills. stado alerts channels prints where each chosen channel would deliver; stado alerts send "test" sends one message and reports what each channel did with it.

E-mail through Skrzynka

The skrzynka channel sends e-mail from a mailbox Skrzynka holds, with that account's own credentials; Stado holds no mail key and calls no mail provider. Three config keys name it:

stado config set alerts.email_to operator@example.com
stado config set alerts.skrzynka_organization <org>
stado config set alerts.skrzynka_mailbox alerts@example.com

alerts.skrzynka_mailbox is a mailbox address or id as skrzynka --organization <org> mailbox list prints it. Each page runs skrzynka --organization <org> message send --mailbox <mailbox> --to <email_to>, so it appears in skrzynka message outbound. A page counts as delivered only when Skrzynka records it sent; stado alerts send prints skrzynka delivered <email_to> (skrzynka outbound <id>). stado doctor reads skrzynka mailbox list and fails the Alerts check when Skrzynka holds no such mailbox, or holds it disabled.

Quick examples

  • You work at your desk and read mail: stado alerts preferences set --channel skrzynka.
  • You want your phone to buzz first and mail as the record: stado alerts preferences set --channel most --channel skrzynka, with most_phone in the alerts item.
  • Before a long sign-in that will need your phone, prove the route works: stado alerts send "Weles will ask you to approve a Google sign-in".

Refusals

What is wrong What Stado says
No choice recorded the operator has chosen no contact channel: the registry holds no operator_contact; stado alerts preferences set --channel <name> ...
operator_contact without a list the registry's operator_contact has no channels list
An empty list the registry's operator_contact.channels is empty
A name Stado cannot page through names "pigeon", a channel Stado cannot page through
A name that is not text holds true, which is not a channel name
set with an unknown channel "pigeon" is not a channel Stado pages through; choose from ...
set naming a channel twice --channel skrzynka is named twice
A chosen channel without its material [alert] <channel>-configuration failed: the vault's alerts item holds no <field>; the operator chose the <channel> channel (operator_contact) and it cannot page without it
skrzynka chosen without its keys [alert] skrzynka-configuration failed: the operator chose the skrzynka channel (operator_contact) but the config declares no alerts.email_to (WC_EMAIL_TO), no …
Skrzynka refuses the send skrzynka refused skrzynka message send --mailbox <mailbox> exited <status>: <Skrzynka's error>
Skrzynka recorded the page but did not send it skrzynka refused skrzynka recorded outbound <id> as failed: <error_code>: <error_message> (or uncertain)
Nothing resolves on send no alert channel resolves, so nobody was paged; the operator chose [...]

Every refusal exits nonzero and changes nothing. stado doctor reports a missing or unreadable choice as a failed Alerts check with the same sentence.

The per-host alerts.channels setting is gone; a host that still carries it ignores it.

Source: this website