Integrations
Integrations
To install Perch’s ConnectWise Automate Advanced Monitoring, follow the steps below.
Prerequisites:
Open your preferred SQL CLI. For this article, we used SQLYog.
Create a new SQL user and set it to have access from only the machine running MetricBeat (ideally the server running the MySQL instance).
CREATE USER ‘user’@’localhost’ IDENTIFIED BY ‘password’;
Replace user and password with the appropriate values you wish to use, for example:
CREATE USER ‘perch-monitor’@’localhost’ IDENTIFIED BY ‘YourRandomComplex!!!PasswordHere6329920’;
Grant the user read-only permissions to all tables in the LabTech database.
GRANT SELECT ON labtech.* TO ‘user’@’localhost’
Apply the changes in permissions:
FLUSH PRIVILEGES;
The installation is now complete and you should see your Automate logs in Perch within 5 minutes. Check out the Marketplace for reports and event notifications for CW Automate Advanced Monitoring.
The following steps will walk you through how to perform a manual installation of ConnectWise Automate Advanced Monitoring. If you’ve run the PowerShell script in the previous section, you don’t need to perform these actions.
Download MetricBeat 7.8 Windows MSI from: https://www.elastic.co/downloads/beats/metricbeat
Install MetricBeat on your Automate Server (this is the server running the MySQL instance), then open: C:\ProgramData\Elastic\Beats\MetricBeat
Open the following file:
metricbreat.example.yml
We will be modifying the output and modules section, and leaving the rest commented. The processor and preprocessor sections can be left uncommented.
Log in to Perch and navigate to the Sensors page: https://app.perchsecurity.com/settings/sensors.
Copy the Client Token at the top. This value is required to get the logs into Perch.
Find the section titled Elasticsearch-Output and modify the following:
#================ Elasticsearch-Output ================
output.elasticsearch:
hosts: ['ingest.perchsecurity.com:443/elastic']
headers:
X-Perch-Header: 'perch-client-token-here'
protocol: 'https'
Save your completed config in the same directory, saving it as it:
metricbeat.yml
Download the Automate Advanced Monitoring Metricbeat modules: https://github.com/PerchSecurity/metricbeat-config/tree/master/automate/modules.d
Deploy your desired YML files to: C:\ProgramData\Elastic\Beats\MetricBeat\modules.d
From an elevated command prompt (Run As Administrator), run the following commands:
Stop the Metricbeat service:
net stop metricbeat
Create the Metricbeat keystore:
"C:\Program Files\Elastic\Beats\7.8.0\metricbeat\metricbeat.exe" --path.home "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.config "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.data "C:\ProgramData\Elastic\Beats\metricbeat\data" --path.logs "C:\ProgramData\Elastic\Beats\metricbeat\logs" keystore create
Input the Read-Only User created in the previous section:
"C:\Program Files\Elastic\Beats\7.8.0\metricbeat\metricbeat.exe" --path.home "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.config "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.data "C:\ProgramData\Elastic\Beats\metricbeat\data" --path.logs "C:\ProgramData\Elastic\Beats\metricbeat\logs" keystore add perch-read-only-sql-user
Input the Read-Only User Password created in the previous section:
"C:\Program Files\Elastic\Beats\7.8.0\metricbeat\metricbeat.exe" --path.home "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.config "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.data "C:\ProgramData\Elastic\Beats\metricbeat\data" --path.logs "C:\ProgramData\Elastic\Beats\metricbeat\logs" keystore add perch-read-only-sql-pass
Input the IP address of the LabTech/Automate MySQL Server – this will be 127.0.0.1 in most instances:
"C:\Program Files\Elastic\Beats\7.8.0\metricbeat\metricbeat.exe" --path.home "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.config "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.data "C:\ProgramData\Elastic\Beats\metricbeat\data" --path.logs "C:\ProgramData\Elastic\Beats\metricbeat\logs" keystore add sql-server-ip
Input the port of the LabTech/Automate MySQL port – this will be 3306 in most instances:
"C:\Program Files\Elastic\Beats\7.8.0\metricbeat\metricbeat.exe" --path.home "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.config "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.data "C:\ProgramData\Elastic\Beats\metricbeat\data" --path.logs "C:\ProgramData\Elastic\Beats\metricbeat\logs" keystore add sql-server-port
Input the port of the LabTech/Automate MySQL database name – this will be labtech in most instances:
"C:\Program Files\Elastic\Beats\7.8.0\metricbeat\metricbeat.exe" --path.home "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.config "C:\Program Files\Elastic\Beats\7.8.0\metricbeat" --path.data "C:\ProgramData\Elastic\Beats\metricbeat\data" --path.logs "C:\ProgramData\Elastic\Beats\metricbeat\logs" keystore add sql-server-db
Restart the Metricbeat service:
net start metricbeat
The installation is should now be complete, and you should see your Automate logs in Perch within 5 minutes. Check out the Marketplace for reports and event notifications for CW Automate Advanced Monitoring.
Still having trouble? Reach out to one or our specialists at help@perchsecurity.com