how-to · watch Open this in the console

Also run a script when the alert clears.

Alerts › scripts. Opened, escalated and resolved are the three events. A fresh alert only starts the script after it is announced.

A flap that clears during the announcement delay starts nothing: not the open, and not the resolve.
01

Opened starts ticked

Open Alerts › scripts and press new trigger. Name it and choose Who is signed in. Under events, opened is ticked. Escalated and resolved are clear. This draft runs when an alert is announced, and not when it later clears.

New alert script trigger with only the opened event ticked
Opened is ticked. Resolved is clear. Nothing is saved yet.
02

Tick resolved as well

Tick resolved. Opened stays ticked. The script starts when the alert is announced, and again when it clears. Accounts server's disk / clears when it drops under 88%. A machine coming back online clears downtime. If the alert comes and goes before that first announcement, nothing starts. Opened and resolved each wait out their own cooldown. Press save when this is the one you want. This shot stops before that. Cancel drops the draft. Run on is still these machines, and none is ticked, so a save would also need a target.

Alert script trigger with opened and resolved ticked
Opened and resolved are both ticked. Save has not been pressed.

A warning that becomes critical is Also run a script when the alert gets worse. The wait before the same event can start it again is Wait before an alert script runs again. Only when it clears, with opened left clear, is Run a script only when the alert clears. Telling a person when it clears is a different tick — Also tell them when an alert clears.