# Forward Linux system logs with rsyslog

Most Linux servers already run rsyslog. Tailcove runs an RFC 5424 syslog endpoint, so you can forward system and service logs without installing anything new.

## 1. Create a source

Create a source for your servers, for example `linux-fleet`, and copy the ingest token.

## 2. Understand how the token travels

Syslog has no headers, so the token goes inside each message as **structured data**:

```
<134>1 2026-10-01T10:15:00.003Z web-1 myapp 1234 - [tailcove@41058 token="YOUR_INGEST_TOKEN"] Payment failed
```

The rsyslog template below adds it for you.

## 3. Configure rsyslog

Create `/etc/rsyslog.d/tailcove.conf`:

```
$DefaultNetstreamDriver gtls
$ActionSendStreamDriverMode 1
$ActionSendStreamDriverAuthMode x509/name
$ActionSendStreamDriverPermittedPeer *.tailcove.dev

template(name="tailcove" type="string"
  string="<%pri%>1 %timestamp:::date-rfc3339% %hostname% %app-name% %procid% - [tailcove@41058 token=\"YOUR_INGEST_TOKEN\"] %msg%\n")

action(type="omfwd" target="ingest.tailcove.dev" port="6514" protocol="tcp"
       template="tailcove")
```

TLS needs rsyslog's GnuTLS module; on Debian and Ubuntu install it with `sudo apt install rsyslog-gnutls`.

## 4. Restart and test

```bash
sudo systemctl restart rsyslog
logger "Hello from rsyslog"
```

Open the source's **Live tail** in Tailcove; the message appears with the server's hostname.

## 5. Use the severity you already have

Syslog severities map directly onto Tailcove levels: `err` becomes `error`, `warning` stays `warning`, `info` stays `info`, and so on. The facility is kept as `context.facility`. That means you can search immediately:

```
level:error host:web-1
```

## Troubleshooting

- **Nothing arrives:** a message with a missing or unknown token is dropped silently, because syslog has no way to send an error back. Double-check the token in the template.
- **Testing with logger directly:** util-linux's `logger` supports `--rfc5424 --tcp --sd-id` for a quick end-to-end test; BusyBox's does not.

## Next steps

- [Alert on error spikes](https://tailcove.dev/guides/alert-on-error-spikes) across your fleet.
- syslog-ng config and framing details in the [syslog reference](https://tailcove.dev/docs/sending-logs/syslog).
