Skip to content

Install the Agent

The kAudit Agent installer is a standard Windows MSI. Choose the method that best fits your environment.

Before you start

  • [ ] SQL Server Audit is enabled and writing .sqlaudit files to a known path — Enable SQL Server Audit
  • [ ] You have the Central API URL (https://api.kovoco.net), Agent API Key, and audit file path
  • [ ] You are logged in as a local Administrator (or have UAC elevation available)
  • [ ] You can reach the API — open a browser or run curl https://api.kovoco.net/health and expect Healthy

Choose your install method

Method A — SimpleMethod B — Config File
Best forSingle database, quick setupMultiple databases, enterprise, or Intune/SCCM deployment
Secrets in command lineYes (API key visible while msiexec runs)No — secrets stay in a file you control
Multi-databaseNo (add databases manually after install)Yes

Method A — Simple install (command-line properties)

Open an elevated command prompt (Run as Administrator) and run:

cmd
msiexec /i "C:\Temp\kaudit\kaudit-msi-installer-<version>.msi" ^
  /qn ^
  /l*v "%TEMP%\kaudit-install.log" ^
  APIURL="https://api.kovoco.net" ^
  APIKEY="sk_agent_xxx_yyy" ^
  AUDITPATH="C:\Audit\*.sqlaudit" ^
  DBNAME="production-db"

Replace each value:

ParameterReplace with
<version>The version number from the filename (e.g., 1.2.0)
APIURLYour Central API URL
APIKEYYour Agent API Key
AUDITPATHFull glob path to your .sqlaudit files
DBNAMEA short display label for this database

Check the exit code when the prompt returns:

cmd
echo Exit code: %ERRORLEVEL%

0 = success. For other codes, see Exit codes below.

Security note

The API key is passed on the command line. Although the MSI installer marks it as hidden in the install log, it may still be visible in process listings while msiexec is running. Use Method B if this is a concern.


Method B — Config file install

Step 1: Create the configuration file

Create kaudit-config.json in a secure location on the target machine. The SYSTEM account must be able to read this path during installation.

json
{
  "CentralApi": {
    "BaseUrl": "https://api.kovoco.net",
    "ApiKey": "sk_agent_xxx_yyy"
  },
  "EventHubPublisher": {
    "Enabled": true,
    "Databases": [
      {
        "Name": "production-db",
        "Enabled": true,
        "AuditSource": {
          "Type": "DirectFile",
          "DirectFile": {
            "AuditFilePath": "C:\\Audit\\*.sqlaudit"
          }
        }
      }
    ]
  }
}

For multiple databases, add additional objects to the Databases array.

Step 2: Run the installer pointing at your config file

cmd
msiexec /i "C:\Temp\kaudit\kaudit-msi-installer-<version>.msi" ^
  /qn ^
  /l*v "%TEMP%\kaudit-install.log" ^
  CONFIGFILE="C:\Temp\kaudit\kaudit-config.json"

Verify the installation

After a successful install, confirm the service is running:

powershell
Get-Service -Name 'kAuditEventHubPublisher'

Expected output:

Status   Name                     DisplayName
------   ----                     -----------
Running  kAuditEventHubPublisher  kAudit EventHub Publisher

Check the install log if you need to troubleshoot:

%TEMP%\kaudit-install.log

Exit codes

CodeMeaning
0Success
1603Fatal error during installation — check the log
1618Another installation is already in progress
1638A newer version is already installed

Next step

After a successful install, you must set the Tenant ID in the config file before the agent can publish events.

Configure the Agent →

SQL Audit Monitoring, made simple.