Server agent logs
Where the Kabeen server agent writes its logs, daily rotation, retention configurable through log_retention_days, and log directory access rights
The Kabeen server agent writes its activity to local log files, the first place to look when diagnosing a problem. Since version 3.2.2, those files are rotated daily with a configurable retention period: a log file growing without bound can no longer fill up the server disk.
Where the logs are
The agent writes one file per day, named after that day's date in YYYY-MM-DD.log format:
| Platform | Location |
|---|---|
| Windows | C:\ProgramData\Kabeen\Server Agent\logs\<YYYY-MM-DD>.log |
| Linux | /var/log/kabeen-server-agent/<YYYY-MM-DD>.log |
The directory is created at the agent's first start if it does not exist.
On Linux the same lines are also sent to journald, which applies its own retention policy, independent of the agent's:
sudo journalctl -u kabeen-server-agent.service -fTo read today's file:
sudo tail -f /var/log/kabeen-server-agent/$(date +%F).logGet-Content "C:\ProgramData\Kabeen\Server Agent\logs\$(Get-Date -Format 'yyyy-MM-dd').log" -Tail 30Before version 3.2.2, the agent wrote to a single
kabeen-server-agent.logfile, opened in append mode and never pruned. After the update that file is no longer written to: you can delete it manually once its contents have been archived, if needed.
Daily rotation
- The agent switches to a new file on the first event logged after midnight.
- At that same switch, it deletes the
.logfiles in the directory that are older than the retention period. - No scheduled task or
logrotateconfiguration is required: the agent handles rotation itself.
Retention period
By default the agent keeps 14 days of logs. You can adjust this server by server with the log_retention_days key in the configuration file (/etc/kabeen-server-agent/config.toml on Linux, C:\ProgramData\Kabeen\Server Agent\config.toml on Windows):
api_key = "YOUR_KABEEN_API_KEY"
# Number of daily log files to keep. Default: 14.
log_retention_days = 30| Value | Effect |
|---|---|
| Positive integer | Logs are kept for that number of days |
Key absent, value 0 or unreadable value | Falls back to the default of 14 days |
Exception to hot reloading. Unlike every other
config.tomlkey, which the agent re-reads automatically every 10 seconds,log_retention_daysis read once at startup, before the logger is initialised. A change only takes effect when the service is restarted.
sudo systemctl restart kabeen-server-agent.serviceRestart-Service KabeenServerAgentEncoding. As with the API key,
config.tomlmust be saved as UTF-8 without BOM — a UTF-16 file, or one with a BOM, prevents the agent from starting. See Diagnostics › Configuration file encoding.
Log directory access rights
Log lines can contain hostnames, service names and network flows observed on the server. On Linux the log directory is therefore restricted to its owner and group (root:root, mode 0750), so unprivileged users cannot browse it. The agent re-applies this mode at every startup.
Do not loosen these rights (
chmod 755or more permissive): the directory mode is what protects the files created by rotation.
For the other diagnostic topics (log levels, startup errors, configuration file encoding), see Diagnostics.