Alerts
Needs a person, machine offline, failed job, failing check; Slack, signed webhooks and email.
The four alert types
An alert is a condition worth a person's attention. The cloud raises four kinds; each is listed on the Alerts page while it is open, and list_alerts lists them (state: resolved for the recently resolved ones). The dashboard's overview and describe_cloud count the open ones.
One alert per condition
Every alert has a fingerprint, and an organisation has at most one open alert per fingerprint: a condition that stays true does not notify twice, and a notification goes out when the alert opens and again when it resolves. Alerts resolve themselves when their condition clears; dismiss_alert and the dashboard resolve one by hand, and it opens again only if the condition clears and recurs.
Channels
Admins add channels under Settings → Notifications and choose, per channel, which alert types it gets; a channel can be switched off without removing it, and shows its last delivery or the last error. An API key with fleet:admin can list channels and send a test (list_channels, test_channel), never add one: targets are chosen by a signed-in person only. Without a channel, alerts only show on the Alerts page.
Deliveries are POSTs with content-type: application/json and a five-second timeout; any 2xx answer counts as delivered, redirects are not followed. A delivery that fails is retried with backoff (1, 2, 4, 8 minutes) and given up after five attempts; the channel shows the error. One organisation's unreachable target never holds up another's.
The signed webhook
A webhook channel POSTs {type, timestamp, data}, where type is alert.opened, alert.resolved or alert.test and data is the alert. The request carries the Standard Webhooks headers, signed with the channel's whsec_… secret, which is shown once when the channel is added. Any Standard Webhooks (or Svix) verifier checks them; so does a skillhook skill, below.
Testing a channel
The Test button on a channel, or test_channel {channel}, sends one sample alert (type needs_human, event alert.test, titled "This is a test notification from Skillhook Cloud") to the target and records on the channel whether it arrived, with the error when it did not. Email tests report when email is not enabled on the deployment.
A skillhook skill that acts on alerts
A machine can act on its own organisation's alerts: point a webhook channel at a skill whose auth is standard-webhooks, with the channel's secret stored on the machine. The skill's when filter keeps resolved and test events from starting a run. The channel's target can be the skill's public URL or its hosted URL; either way the machine verifies the signature itself. The secret must have a name of its own: a skill's secret_env may not name one of skillhook's credentials (SKILLHOOK_ADMIN_TOKEN, SKILLHOOK_CLOUD_*).
Dismissing
dismiss_alert {alert} (members, or a fleet:run key) resolves an open alert by hand; the channels are not told (they are when an alert resolves on its own). Use it for a failed job you have dealt with; answering an agent or bringing a machine back resolves theirs without you.