Home/Refreshers/Send host logs off the machine: refresher
Send host logs off the machine
Forward system logs to a collector so they outlive the machine that wrote them.
Remember
- Something happens on the host: a login, a new process, a service install.
- Recorded locally: journald and rsyslog on Linux, event logs and Sysmon on Windows.
- Held until sent: a disk queue on Linux, the event log itself on Windows.
- The collector: over TLS from Linux, Kerberos-encrypted WinRM from Windows.
| Platform | Uses | The part that catches people |
|---|---|---|
| Linux | rsyslog forwarding, with a queue that survives the collector being down | journald throws messages away above its own rate limit before rsyslog ever sees them. |
| Windows | Sysmon, and Windows Event Forwarding to a collector | The forwarder runs as NETWORK SERVICE, which cannot read the Security or Sysmon logs by default. |
Run the quick start
| Reach the Linux machines | ansible all -i inventory.ini -m ping |
| Windows modules, once | ansible-galaxy collection install ansible.windows:==3.3.0 |
| Reach the Windows machines | ansible all -i inventory.ini -m ansible.windows.win_ping |
| Preview | ansible-playbook -i inventory.ini playbook.yml --check --diff |
| Run | ansible-playbook -i inventory.ini playbook.yml |
| Run again, expect changed=0 | ansible-playbook -i inventory.ini playbook.yml |
Check it worked
Make something happen on a host, such as a login or a new process. Find it on the collector within a minute or two.