SQLAgent

Steps on how to set-up SQLAgent integration

  • Go to the Integrations tab
  • Locate SQLAgent in the list
    • Click the Config button
  • Click Sync Authorization
  • Provide the following:
    • Secret Code
    • IP Address
    • Database Name
    • UserID
    • Password

If the set-up is done correctly, a “success” message will popup in the top menu. Integration setting status will display in green and sync will start

 


Pre-Condition:

  • Install .net core 3.1. Please install the correct installation based on your Windows OS
    • https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.401-windows-x64-installer

    • https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.401-windows-x86-installer

Steps to install the Windows Service:

  • Copy the zip file "MSP Agent Service.zip" to the target machine and unzip the file

  • Get the secret from the MSPbot website and update the file "appsetting.json" with the secret
  • Run the following command line under the unzipped folder of installation files under the administrator
    • sc.exe create MSPAgentService binPath=AgentService.exe displayname="MSP Agent Service"

  • You should be able to see one windows service named "MSPAgentService" in Services window. Please start the windows service

  • You are now able to see the logs created under the following path:
    • C:\Windows\System32\MSPAgentService\Logs
  • Locate the JSON file under the following path [C:\Windows\System32\MSPAgentService\Configs]
    • It is the config file that contains the database connection info and the SQL statements that windows service would execute
  • If the tenant DB connection info is not generated, then the windows service would do nothing
  • At this moment, we try to get the config info (DB info and SQLs) for every 5 minutes.

    • For executing the SQL statement, the interval is 3 minutes

  • Whether the SQL is executed is also depending on the SQL interval passed from MSPBots, which is also stored in SQLConfig.json file