Auto-healing scripts can be used to transform your threshold item into a multi-tasking helper that automatically fixes problems and keeps everything running smoothly. Once a monitored threshold is triggered, added auto-healing scripts will run as soon as possible across all assigned devices.
How auto-healing scripts work
Auto-healing scripts let you automate responses when thresholds are breached, ensuring issues are addressed as soon as they occur.
- Where they apply: Auto-healing scripts can be added to custom or script-based threshold items (and will run on Windows and Mac devices only).
- How many: You can add up to 3 auto-healing scripts per item, giving you the flexibility to cover a range of fixes or chain multiple actions together.
- Execution order: Scripts run sequentially in the order defined. You can drag and drop them to change the order after adding.
- Backwards compatibility: Existing profiles with an auto-healing script attached will retain it — you can now add two more.
- When they run: All added auto-healing scripts will run — sequentially — if the assigned threshold profile is active and the threshold is triggered.
- Self-healing script output is currently not displayed in the Atera portal. To view the output, you must integrate local logging within your self-healing script as a workaround.
Add auto-healing scripts to a threshold item
Auto-healing scripts can be added to both custom and script-based threshold items. While numerous custom and script-based threshold items can be used on Linux, auto-healing scripts will run only on Windows and Mac devices.
To attach an auto-healing script:
1. Go to Admin > Monitoring and automation > Thresholds.
The Threshold profiles page appears.
2. Select a profile (or add a new one).
The threshold profile appears.
3. Click New item.
The Threshold item window appears.
4. Select the Custom or Script-based tab, before completing the required setup for your chosen item type (name, alert severity, time period, etc). For more info on available custom or script-based threshold items, see Threshold profiles: monitor events
5. Under Auto-healing scripts, click Add script.
The Select script window appears.
6. Click Select on the script you want to add.
The auto-healing script is added to the threshold item.
Repeat steps 5 and 6 for each auto-healing script you want to add.
Note: You can drag and drop them after adding to adjust the sequence in which they will run when the threshold is triggered.
7. When you're done setting up the threshold item, click Add.
The item is added to the threshold profile, detailing the the scripts that will run when the threshold it triggered.
8. Save the profile.
When the threshold is triggered on a device with this profile assigned, the attached auto-healing scripts will run sequentially in the defined order.