how-to · watch Open this in the console

Run a script only when the alert clears.

Alerts › scripts. Opened, escalated and resolved are the three events. A script that should tidy up after the problem is gone wants resolved alone.

A flap that clears during the announcement delay starts nothing: there was no open, and there is no 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

Clear opened and tick resolved

Clear opened and tick resolved. The script does not start when the alert is announced. It starts when the condition 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. 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 only the resolved event ticked
Opened is clear. Resolved is ticked. Save has not been pressed.

Also when it opens is Also run a script when the alert clears. A warning that becomes critical, and not the first open, is Run a script only when the alert gets worse. Also when it gets worse, with opened still ticked, is Also run a script when the alert gets worse. Telling a person when it clears is Also tell them when an alert clears.