Repair - CW Control Client
Purpose
This solution, built for the ConnectWise platform, aims to identify all offline computers in the ConnectWise Automate application that are online or missing from the ConnectWise Control application, and subsequently install or repair the Automate Agent on those machines. To achieve this, a ConnectWise Automate script called EPM - Data Collection - Script - Get - CW-ControlAPI - Online Status* is used, which fetches the online status of all machines from CW Control on a periodic basis.
Following this, the solution uses a ConnectWise Automate internal monitor named CWM - Control - Monitor - Agent - CW Control Needs Repair to detect the offline machines that are online in Automate but not in Control, based on the results of the EPM - Data Collection - Script - Get - CW-ControlAPI - Online Status* script. This monitor is then assigned a ConnectWise Automate alert template named △ CUSTOM - Autofix Action - Repair CW Control, which is configured to run the autofix script named CWM - Control - Script - CW Control - Repair [RMM+, Autofix, Globals] on the machines identified by the internal monitor.
The ConnectWise Automate autofix script, CWM - Control - Script - CW Control - Repair [RMM+, Autofix, Globals], attempts to repair the issue with the installed CW Control instance and can generate a ticket if the fix fails. By using this solution, all offline machines can be identified, and the connectivity issues with the CW Control instance can be resolved effectively.
Associated Content
Content | Type | Function |
---|---|---|
EPM - Data Collection - Script - Get - CW-ControlAPI - Online Status* | Script | The script EPM - Data Collection - Script - Get - CW-ControlAPI - Online Status* fetches the online status of all machines in ConnectWise Control and inserts those states into a custom table for the solution to identify offline computers. |
CWM - Control - Monitor - Agent - CW Control Needs Repair | Internal Monitor | The monitor set detects machines that are offline according to the EPM - Data Collection - Script - Get - CW-ControlAPI - Online Status* script result but are online in Automate. |
△ CUSTOM - Autofix Action - Repair CW Control | Alert Template | To run the autofix script on the machines detected by the internal monitor. |
CWM - Control - Script - CW Control - Repair [RMM+, Autofix, Globals] | Autofix Script | This script attempts to repair the problem with the installed CW Control instance and can create a ticket on failures. |
Implementation
- Import EPM - Data Collection - Script - Get - CW-ControlAPI - Online Status* script.
- Execute the script against any machine to create EPM - Data Collection - Custom Table - plugin_proval_control_session_status table.
- Import the CWM - Control - Monitor - Agent - CW Control Needs Repair monitor set.
- Import CWM - Control - Script - CW Control - Repair [RMM+, Autofix, Globals] script.
- Import/create the
△ CUSTOM - Autofix Action - Repair CW Control
alert template. - Schedule the EPM - Data Collection - Script - Get - CW-ControlAPI - Online Status* script to run twice per day. It is suggested to use the Labtech Server group for on-prem partners and the Domain Controller of the primary client for hosted partners.
- Update the run time of the CWM - Control - Monitor - Agent - CW Control Needs Repair monitor set to run 20-30 minutes after the scheduled script run.