how-to · watch Open this in the console

Run a script only when a machine restarts.

Alerts › scripts. Reboots is the kind for a machine that restarted. A routine restart is a notice, and warning and above skips a notice.

Set the floor to info if a routine restart should start the script. Warning and above leaves that notice quiet.
01

Downtime starts ticked

Open Alerts › scripts and press new trigger. Name it and choose Who is signed in. Downtime is already ticked. Reboots is clear, so a restart would not start this draft. Disk, checks, network path, Docker apps and custom metric are clear too. The floor stays at warn and above.

New alert script trigger with downtime ticked and reboots clear
New trigger. Downtime is ticked. Reboots is clear. Nothing is saved yet.
02

Tick reboots and clear downtime

Tick reboots and clear downtime. A restart is the only kind that starts this script. Accounts server's disk at 92% is a disk alert, so it would not. The key box stays empty, so every restart matches, on every machine. A routine restart is recorded as a notice, and the floor is still warn and above, so that notice stays quiet until the menu beside when is info. 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 reboots kind ticked
Reboots is ticked. Downtime is clear. The floor is still warn and above. Save has not been pressed.

Telling a person about a restart, with no script, is Only tell them about a reboot. The floor is Only run a script for a critical alert — info is the lowest choice on that menu. A full disk is Run a script only when a disk fills. A failed check is Run a script only when a check fails.