# Audit Log with Syslog
# Preamble
Psono can forward audit events directly to a syslog collector over UDP, TCP, or TLS over TCP. See the audit log guide for general audit logging configuration.
TIP
This feature is only available in the Enterprise Edition.
# Server (settings.yaml)
Set both SYSLOG_TARGET_IP and SYSLOG_TARGET_PORT to enable forwarding, then restart the server.
Despite its name, SYSLOG_TARGET_IP accepts either an IP address or a hostname.
# UDP
SYSLOG_TARGET_IP: 'syslog.example.com'
SYSLOG_TARGET_PORT: 514
UDP is the default. Existing configurations continue to use UDP without any changes.
You can also select it explicitly with SYSLOG_TRANSPORT: 'udp'.
# TCP
SYSLOG_TARGET_IP: 'syslog.example.com'
SYSLOG_TARGET_PORT: 514
SYSLOG_TRANSPORT: 'tcp'
# TLS over TCP
SYSLOG_TARGET_IP: 'syslog.example.com'
SYSLOG_TARGET_PORT: 6514
SYSLOG_TRANSPORT: 'tls'
TLS verifies the collector's certificate and hostname using the server's system CA store by default. For a private certificate authority, specify a PEM CA bundle:
SYSLOG_TLS_CA_CERTS: '/etc/ssl/syslog/ca-bundle.pem'
The hostname used for certificate verification and Server Name Indication (SNI) defaults to SYSLOG_TARGET_IP.
If you connect to an IP address but the collector's certificate is issued for a DNS name, set that name explicitly:
SYSLOG_TARGET_IP: '192.0.2.10'
SYSLOG_TLS_SERVER_HOSTNAME: 'syslog.example.com'
If the collector requires a client certificate (mutual TLS), also configure the PEM certificate and private key:
SYSLOG_TLS_CERTFILE: '/etc/ssl/syslog/client-cert.pem'
SYSLOG_TLS_KEYFILE: '/etc/ssl/syslog/client-key.pem'
The private key must be unencrypted. SYSLOG_TLS_KEYFILE may be omitted if the key is included in the certificate file.
When using Docker, mount these files into the Psono server container and use their paths inside the container.
# Configuration reference
| Setting | Default | Description |
|---|---|---|
SYSLOG_TARGET_IP | Not enabled | Collector IP address or hostname. Must be explicitly set together with the port to enable forwarding. |
SYSLOG_TARGET_PORT | Not enabled | Collector port. Must be explicitly set. Typical ports are 514 for UDP/TCP and 6514 for TLS. |
SYSLOG_TRANSPORT | udp | Transport: udp, tcp, or tls. |
SYSLOG_TLS_VERIFY | True | Verify the collector's certificate and hostname. False disables both checks. |
SYSLOG_TLS_CA_CERTS | System CA store | Path to a PEM CA bundle for certificate verification. |
SYSLOG_TLS_SERVER_HOSTNAME | SYSLOG_TARGET_IP | Name used for certificate verification and SNI. |
SYSLOG_TLS_CERTFILE | Not set | PEM client certificate, optionally including the private key. |
SYSLOG_TLS_KEYFILE | Not set | PEM client private key. Requires SYSLOG_TLS_CERTFILE. |
TLS-specific settings apply only when SYSLOG_TRANSPORT is tls.
The port always comes from SYSLOG_TARGET_PORT; selecting a transport does not change the port automatically.
All transports retain the existing syslog message format, including the trailing NUL byte. Configure TCP/TLS collectors to accept NUL-delimited messages; this transport does not use octet-counted framing.
The settings are also available as environment variables
with the PSONO_ prefix, for example:
export PSONO_SYSLOG_TARGET_IP=syslog.example.com
export PSONO_SYSLOG_TARGET_PORT=6514
export PSONO_SYSLOG_TRANSPORT=tls
export PSONO_SYSLOG_TLS_CA_CERTS=/etc/ssl/syslog/ca-bundle.pem