ConnectWise Automate Huntress Agent Internal Monitor
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 email@example.com.
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. 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
- Select an Alert Template, set your Alert Message preferences, and select your "Huntress Install" script as the Script to Run. Click Save
- 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.
June 6th, 2020 - Version 1.0 of the document was created.
July 30th, 2020 - added prerequisite