Update Alloy configuration in README to include log level and tail_from_end setting for audit logs

This commit is contained in:
2026-01-18 17:27:38 +01:00
parent fe38e97e02
commit 2c9cb6df90

View File

@@ -26,12 +26,15 @@ Add the following configuration to your Alloy setup:
```hcl
loki.source.file "vault_audit_log" {
targets = [
{"__path__" = "/var/log/vault/audit.log", "log_name" = "vault_audit"},
{"__path__" = "/var/log/vault/audit.log", "log_name" = "vault_audit", "level" = "info"},
]
forward_to = [loki.write.default.receiver]
tail_from_end = true
}
```
> **Note:** `tail_from_end = true` ensures that only new log entries are read, preventing the ingestion of old lines/entries. It is (probably) required because the audit log file does not contain timestamps and only entry guids.
Check auditing configuration with:
```bash