Skip to main content

Offline Agents - Auto-Retire - Pre-Audit No Action,Email

Summary

This script aims to email the details of 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 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.

Sample Run

Leave all parameters except Email_address blank for an email regarding all the obsolete workstations.

Sample Run

Set the Server value to 1 for an email regarding all the obsolete workstations as well as servers.

Sample Run

Note: Since this is a client script, it must be executed on the client.

Global Parameters

NameRequiredExampleDescription
TicketCreationCategoryFalse298Mention the ticket creation category in order to direct the tickets to the right board in Manage.

User Parameters

NameExampleRequiredDescription
Set_Environment1Mandatory for the first runFor 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_Days180FalseThe global property 'AutoRetireThreshold_Days' is set when the value in 'Set_Global_Threshold_Days' is set. If left empty, the global property will be set to '90'.
Server1FalseSet its value to 1 if the client wants to retire servers along with workstations.
Email_Addressxyz@something.comFalseEmail address where the partner wants to receive the details of obsolete agents.
Ticketing1FalseInput its value as '1' if you would like to receive a ticket with a list of obsolete machines.

System Properties

NameExampleRequiredDescription
AutoRetireThreshold_Days180TrueThreshold 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.

System Properties

Extra Data Fields

NameLevelSectionTypeRequiredDescription
Exclude From Auto-Retire AutomationClientExclusionsCheck boxFalseThe script will not generate any tickets for the client if this EDF is checked.
Exclude From Auto-Retire AutomationLocationExclusionsCheck boxFalseThe script will not include any computer from the location in the ticket if this EDF is checked.
Exclude From Auto-Retire AutomationComputerExclusionsCheck boxFalseThe script will not include the computer in the ticket if this EDF is checked.
AutoRetire Threshold DaysClientDefaultTextBoxFalseTo overwrite the threshold set in the Global Property AutoRetireThreshold_Days for the client.
AutoRetire Threshold DaysLocationDefaultTextBoxFalseTo overwrite the threshold set in the Global Property AutoRetireThreshold_Days and Client-Level EDF AutoRetire Threshold Days for the location.

Following EDFs can be used to overwrite the Threshold Days defined in the System property AutoRetireThreshold_Days:

Client-Level EDF: "AutoRetire Threshold Days"

Client-Level EDF

Location-Level EDF: "AutoRetireThreshold_Days"

Location-Level EDF

Following EDFs can be used to exclude a client/location/computer from retirement:

Client-Level EDF: "Exclude From Auto-Retire Automation"

Client-Level EDF

Location-Level EDF: "Exclude From Auto-Retire Automation"

Location-Level EDF

Computer-Level EDF: "Exclude From Auto-Retire Automation"

Computer-Level EDF

Implementation

  1. Import the script using the ProSync Plugin.

  2. Reload the System Cache.

    Reload Cache

  3. 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 and Set_Global_Threshold_Days set to the number of days for the global property AutoRetireThreshold_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.