Set a station's alerts
Use this to hear when a work station's sent-back rate, cost or another measure of its runs crosses a threshold. You need the line in Terraform. See Manage Spotlight with Terraform.
Set alerts
Add one alert block per threshold to the station's block in the
spotlight_line resource. Each names a measure, how many runs it compares
in over, and exactly one of rises_by, falls_by, above and below:
alert {
measure = "sent_back_rate"
rises_by = 0.2
over = 20
}
alert {
measure = "cost_per_run"
above = 5
over = 10
}For a rate, write shares from 0 to 1, so 0.2 is 20 percentage points. For
cost_per_run, write an amount in the workspace's currency.
Give a measure at most one alert of each kind of threshold, such as one
rises_by and one above. A second of the same kind is rejected.
Run terraform apply.
Check the station
Open the line's board and select the station's name. On the station's Config tab, check each alert under Alert rules. See Judge and alerts.
If Terraform rejects the line, the message names the field. Alert fields lists each message. An alert on the backlog or the completed station is rejected, because nothing runs there.
When an alert fires, the task of the run that fired it gets an inbox item that reads Station alert fired. It reaches only people on the team and the workspace's owners and admins. See Answer the inbox. An alert can also start a search of the station; see When a search starts.