mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-18 00:17:39 +01:00
3.0 KiB
3.0 KiB
Sensor Proxy Log Forwarding
Forward pulse-sensor-proxy logs to a central syslog/SIEM endpoint so audit
records survive host loss and can drive alerting. Pulse ships a helper script
(scripts/setup-log-forwarding.sh) that configures rsyslog to ship both
audit.log and proxy.log over RELP + TLS.
Requirements
- Debian/Ubuntu host with rsyslog and the
imfile+omrelpmodules (present by default). - Root privileges to install certificates and restart rsyslog.
- TLS assets for the RELP connection:
ca.crt– CA that issued the remote collector certificate.client.crt/client.key– mTLS credentials for this host.
- Network access to the remote collector (
REMOTE_HOST, defaultlogs.pulse.example, port6514).
Installation Steps
- Copy your CA and client certificates into a safe directory on the host (the
script defaults to
/etc/pulse/log-forwarding). - Run the helper with environment overrides for your collector:
The script writes
sudo REMOTE_HOST=logs.company.tld \ REMOTE_PORT=6514 \ CERT_DIR=/etc/pulse/log-forwarding \ CA_CERT=/etc/pulse/log-forwarding/ca.crt \ CLIENT_CERT=/etc/pulse/log-forwarding/pulse.crt \ CLIENT_KEY=/etc/pulse/log-forwarding/pulse.key \ /opt/pulse/scripts/setup-log-forwarding.sh/etc/rsyslog.d/pulse-sensor-proxy.conf, ensures the certificate directory exists (0750), and restarts rsyslog.
What the Script Configures
- Two
imfileinputs that watch/var/log/pulse/sensor-proxy/audit.logand/var/log/pulse/sensor-proxy/proxy.logwithTagspulse.auditandpulse.app. - A local mirror file at
/var/log/pulse/sensor-proxy/forwarding.logso you can inspect rsyslog activity. - An RELP action with TLS, infinite retry (
action.resumeRetryCount=-1), and a 50k message disk-backed queue to absorb collector outages.
Verification Checklist
- Confirm rsyslog picked up the new config:
sudo rsyslogd -N1 sudo systemctl status rsyslog --no-pager - Tail the local mirror to ensure entries stream through:
sudo tail -f /var/log/pulse/sensor-proxy/forwarding.log - On the collector side, filter for the
pulse.audittag and make sure new entries arrive. For Splunk/ELK, index onprogramname. - Simulate a test event (e.g., restart
pulse-sensor-proxyor deny a fake peer) and verify it appears remotely.
Maintenance
- Certificate rotation: Replace the key/cert files, then restart rsyslog. Because the config points at static paths, no additional edits are required.
- Disable forwarding: Remove
/etc/rsyslog.d/pulse-sensor-proxy.confand runsudo systemctl restart rsyslog. The local audit log remains untouched. - Queue monitoring: Track rsyslog’s main log or use
rsyslogd -N6to check for queue overflows. At scale, scrape/var/log/pulse/sensor-proxy/forwarding.logforaction resumedmessages.
For rotation guidance on the underlying audit file, see operations/audit-log-rotation.md.