Product: ConnectWise Automate
Environment: Huntress integration
Summary: Setup guide for the ConnectWise Automate Internal Monitor to auto install the Huntress Agent.
Huntress has fully implemented Watchdog functionality into our services. While monitoring services can be a best practice in some scenarios, Huntress strongly recommends disabling self-healing actions and scripts that start or restart our services.
Starting a service during an update can lead to unintended consequences that can disrupt stability and functionality.
Updates often involve modifying configuration files, upgrading dependencies, or replacing critical components, which can leave the service in an inconsistent state if it starts prematurely. For example, the service may attempt to access files or resources that are being updated, leading to errors or data corruption. Additionally, partial updates can result in mismatched versions of libraries or binaries, causing the service to crash or behave unpredictably.
The SQL query provided essentially follows the logic of: "Is "Huntress_Install" checked off for Client, if yes, is Huntress NOT installed? If yes, install it." It is possible to build upon the query/monitor. If you have any enhancements you'd like for us to share with other Partners, feel free to email support@huntress.io.
Note that this, along with anything computer code, it comes with its limitations. This documentation was created in a controlled environment. There may be instances where the monitor may not function as expected and Huntress is not able to provide support for this. The best places for help on these issues are ConnectWise University Automate Documentation, MSPGeek, and r/labtech.
- Launch the Control Center
- Go to Systems Configuration Dashboard
- Click Config Configurations Additional Fields. Fill in Field Name, Field Type, Tab, Data Screen, and Tooltip with suggested values below
- Open a Client and verify that there is a Huntress_Install and Huntress Tab (check off "Huntress_Install" for Clients that are getting Huntress)
- Go to Automation Monitors Internal Monitors and right-click to create "New Monitor
-
-
- Create the monitor with the suggested parameters below (pasted SQL below image). Interval and Next Run Time can be set to your liking. Click Add when done.
SELECT DISTINCT c.ComputerID AS TestValue, c.name AS IDentityField, c.Computerid AS ComputerID, acd.NoAlerts, acd.UpTimeStart, acd.UpTimeEnd FROM Computers c LEFT JOIN AgentComputerData acd ON (c.computerid = acd.computerid) LEFT JOIN v_extradatalocations edl ON (c.LocatioNID = edl.LocationID) LEFT JOIN v_extradataclients edc ON (c.ClientID = edc.ClientID) WHERE OS LIKE '%Microsoft%Windows%' AND (edc.`Huntress_Install`) = 1 AND C.ComputerID NOT IN (SELECT ComputerID FROM Software WHERE Software.Name LIKE 'Huntress%')
To test: click the "Build and View Query" button. Note: you must have Huntress_install checked off (see step 4) for at least one Client and that client must have at least one endpoint without Huntress installed
- You will need to create an Alert Template (or choose an existing one that runs scripts) and set the Huntress Agent Install script to run for Script to Run.
- At a minimum, your Alert Template will need to have the Script option checked off. (You can also choose to send an email or create a PSA ticket).
- Select an Alert Template, set your Alert Message preferences, and select your "Huntress Install" script as the Script to Run. Click Save
- At a minimum, your Alert Template will need to have the Script option checked off. (You can also choose to send an email or create a PSA ticket).
- You should now see the "Huntress Install" Monitor listed in your Internal Monitors.
-
- If you open the failed monitor, it will give you a list of all endpoints missing Huntress, along with their location and ComputerID.
Have suggestions/concerns?
June 6th, 2020 - Version 1.0 of the document was created.
July 30th, 2020 - added prerequisite
November 29th, 2021 - added steps 3.1 and 3.2