Alerts
Tell someone in Slack, Teams or email when a condition fires, without stopping the test.
alarm(
"too_hot",
when=ch["/demo/temperature"].above(80),
severity="warn",
notify=["test-conductor"],
)
when | what fires it: a comparison on a channel, above(x), below(x), within(lo, hi) or outside(lo, hi) |
severity | info, warn or critical. Any other value is refused |
notify | role names: lowercase letters, digits, - and _, such as test-conductor |
A role names who to tell, not where. On Alerts in the console, map each
role to one or more channels on a Slack, Microsoft Teams or Email (SMTP)
connector. Change who gets paged there, with no redeploy. Recent deliveries
on the same page shows each firing's outcome, including no such role when
notify= names a role that doesn't exist.
Each firing is saved as a mark on the channel, so you can find it in
Replay. That is why when is a comparison, not a lambda: Phloem must
be able to find the mark again in recorded data.
An alert only notifies. To act on hardware, use an interlock. To stop the test, use a stop condition.
Get a Slack message when a limit is crossedSet up a role and an alarm, step by stepStop conditionsStop the test instead of telling someone
Updated