Offline Agents - Auto-Retire - Manual Execution
Summary
The purpose of this script is to retire the client agents that are offline in Automate for more than the days defined in the Threshold
and are not Broken
agents.
Sample Run
For the initial execution:
Set the Set_Environment
value to 1 and set the Set_Global_Threshold_Days
value as per the client's requirement, suppose it's '180' days.
Leave all parameters blank to retire just workstations.
Set the Server
value to 1
to retire both workstations and servers.
Note: Since this is a client script, it must be executed on the client.
User Parameters
Name | Example | Required | Description |
---|---|---|---|
Set_Environment | 1 | Mandatory for the first run | For the script's initial execution, this parameter must be used. The dependent EDFs and the system property are essential for the script to function properly. These required EDFs and System Property are created when the script is executed with this parameter set to 1. |
Set_Global_Threshold_Days | 180 | False | The global property 'AutoRetireThreshold_Days' is set when the value in 'Set_Global_Threshold_Days' is specified. If left empty, the global property will be set to '90'. |
Server | 1 | False | Set its value to 1 if the client wants to retire servers along with workstations.
|
System Properties
Name | Example | Required | Description |
---|---|---|---|
AutoRetireThreshold_Days | 180 | True | Threshold days to retire the offline computers. The default is 90. It can either be set during the first execution of the script or manually from the dashboard. |
Extra Data Fields
Name | Level | Section | Type | Required | Description |
---|---|---|---|---|---|
Exclude From Auto-Retire Automation | Client | Exclusions | Check box | False | The script will not generate any tickets for the client if this EDF is checked. |
Exclude From Auto-Retire Automation | Location | Exclusions | Check box | False | The script will not include any computer from the location in the ticket if this EDF is checked. |
Exclude From Auto-Retire Automation | Computer | Exclusions | Check box | False | The script will not include the computer in the ticket if this EDF is checked. |
AutoRetire Threshold Days | Client | Default | TextBox | False | To overwrite the threshold set in the Global Property AutoRetireThreshold_Days for the client. |
AutoRetire Threshold Days | Location | Default | TextBox | False | To overwrite the threshold set in the Global Property AutoRetireThreshold_Days and Client-Level EDF AutoRetire Threshold Days for the location. |
The following EDFs can be used to overwrite the Threshold Days defined in the System property AutoRetireThreshold_Days
:
Client-Level EDF: "AutoRetire Threshold Days"
Location-Level EDF: "AutoRetireThreshold_Days"
The following EDFs can be used to exclude a client/location/computer from retirement:
Client-Level EDF: "Exclude From Auto-Retire Automation"
Location-Level EDF: "Exclude From Auto-Retire Automation"
Computer-Level EDF: "Exclude From Auto-Retire Automation"
Implementation
- Import the script using the ProSync Plugin.
- Reload the System Cache.
- Configure the script as follows:
- Navigate to Automation --> Scripts within the CWA Control Center and open the script.
- Debug the script against any client with the
Set_Environment
parameter set to 1 andSet_Global_Threshold_Days
set to the number of days for the global propertyAutoRetireThreshold_Days
.- Validate that the system property was set correctly by navigating to System --> Configuration --> Dashboard --> Config --> Configurations --> Properties --> Check the property 'AutoRetireThreshold_Days'.
- Run the script against the desired client.