Automated Remediation Example: Full Disk Cleanup with Ticket & Billable Time
Table of Contents
Overview
When Syncro detects a Disk Full RMM Alert, an automated remediation can take action without your client ever needing to report an issue.
In this example, you'll learn how to create an automated remediation that:
- Creates a ticket (linked to the alert),
- Runs a cleanup script to reclaim free space and adds the results of the script to the Ticket (as a comment),
- Optionally adds billable time and marks the Ticket as Resolved (if “enough” space was cleared up).
Note: This setup is similar to Automated Remediation Example: Bill for Windows Updates in that you'll use the “Convert to Ticket” Action and pass the created Ticket's number into a script via a runtime variable, using the template tag {{ticket_number}}.
Prerequisites
- Import the “Disk Space Cleanup with Ticket / Billable Time Options” Community Script.
- Verify that your Labor Rates are set up the way you want.
- Train your Techs on reviewing auto-generated tickets before invoicing (if needed).
Build the Automated Remediation
- Navigate to the Assets & RMM tab.
- From the View dropdown menu, select “Automated Remediation.”
- Click +New Automated Remediation and Name it something meaningful, like “Disk Cleanup with Ticket and Auto Close.”
- In the Condition section, click the + icon and create the following Condition(s):
- (Required): Trigger Category, is, Low Hard Drive Space (this will convert to low_hd_space_trigger).
-
(Optional): Rate Limit, 1 Times, Per 7 Days (or the number of days you'd prefer).
REMINDER: Automations are only evaluated when the initial RMM Alert triggers, but are NOT evaluated on updates for existing/open RMM Alerts. Each time a new low disk space alert triggers and matches the Conditions in this automated remediation, the Rate Limit counter for the triggering Asset increases by one. So if the Rate Limit is set to 1 times per 7 days (as is recommended below), the second triggering of a low disk space RMM Alert for the same asset within a 7 day period causes the automation to be skipped. This limits the number of billable tickets created by this automation to 1 per week per asset.
- In the Run the Following Actions for the Matching RMM Alerts section, click the + icon and create the following three Actions:
- Action: Clear Alert (Needed if you want to run this automated remediation continuously; automated remediations do not re-run on already-opened alerts.)
-
Action: Convert to Ticket. (Fill in as many details as you'd like here.)
-
Action: Run Script
- Script: Select the “Disk Space Cleanup with Ticket / Billable Time Options” Community Script you imported.
- Delay Minutes: 0
- Enter/select values for the script's five variables. For example:
- $freeSpaceToCloseTicket (dropdown variable): If the final result of the clean up has AT LEAST this % of space free on the disk, set the Ticket Status to “Resolved.” (10% is shown in the example screen above.)
- $ticketNumber (runtime variable): Enter {{ticket_number}}. This is passed in from the “Convert to Ticket” Action.
- $ticketTime (dropdown variable): If you want to record labor time against this Ticket, specify how much in minutes. (10 minutes is shown in the example above.)
- $techEmail: A Syncro User's email (e.g., a Technician) who will log the ticket time.
- $billForTime: For recorded time, specify whether you want to charge for that labor or not.
Note: It's OK if the “Convert to Ticket” Action is below the “Run Script” one. Just be sure to add the template tag {{ticket_number}} into the runtime variable for $ticketNumber.