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
.sqlauditfiles 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/healthand expectHealthy
Choose your install method
| Method A — Simple | Method B — Config File | |
|---|---|---|
| Best for | Single database, quick setup | Multiple databases, enterprise, or Intune/SCCM deployment |
| Secrets in command line | Yes (API key visible while msiexec runs) | No — secrets stay in a file you control |
| Multi-database | No (add databases manually after install) | Yes |
Method A — Simple install (command-line properties)
Open an elevated command prompt (Run as Administrator) and run:
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:
| Parameter | Replace with |
|---|---|
<version> | The version number from the filename (e.g., 1.2.0) |
APIURL | Your Central API URL |
APIKEY | Your Agent API Key |
AUDITPATH | Full glob path to your .sqlaudit files |
DBNAME | A short display label for this database |
Check the exit code when the prompt returns:
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.
{
"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
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:
Get-Service -Name 'kAuditEventHubPublisher'Expected output:
Status Name DisplayName
------ ---- -----------
Running kAuditEventHubPublisher kAudit EventHub PublisherCheck the install log if you need to troubleshoot:
%TEMP%\kaudit-install.logExit codes
| Code | Meaning |
|---|---|
0 | Success |
1603 | Fatal error during installation — check the log |
1618 | Another installation is already in progress |
1638 | A 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.
