# Sending Logs: Syslog

Tailcove runs a dedicated RFC 5424 syslog server alongside the HTTP ingest
endpoint, for infrastructure that already speaks syslog (rsyslog,
syslog-ng, network appliances, Vector's/Fluent Bit's own syslog sinks) and
would otherwise need an extra hop just to reach Tailcove.

```
tcp://ingest.tailcove.dev:6514
```

Ask your Tailcove operator for the exact host/port if you're running a
self-hosted instance: `TAILCOVE_SYSLOG_PORT` defaults to `6514` but can be
changed per deployment. The connection is TLS if the server has a
certificate configured (recommended for anything crossing the public
internet); otherwise it's plain TCP.

## Identifying your source: the token

Syslog has no `Authorization` header, so the source's ingest token travels
inside the message itself, in **STRUCTURED-DATA**:

```
<134>1 2026-07-05T10:15:00.003Z web-1 myapp 1234 - [tailcove@41058 token="YOUR_INGEST_TOKEN"] Payment failed for order 8213
```

The `tailcove@41058` element name is arbitrary (the server looks for a
`token` parameter on _any_ structured-data element, not a specific SD-ID),
but using a distinct element like this keeps it out of the way of any other
structured data your sender already attaches.

**MSGID fallback:** if your sender genuinely can't set structured data, the
token is also accepted directly as MSGID:

```
<134>1 2026-07-05T10:15:00.003Z web-1 myapp 1234 YOUR_INGEST_TOKEN -
```

This only works if your token is short enough to fit: RFC 5424 caps MSGID
at 32 characters, and Tailcove's tokens are 40. Prefer structured data;
treat MSGID as a last resort for senders you can't otherwise configure.

## Severity → level

RFC 5424's severities map directly onto Tailcove's own level names, since
the standard's keywords were adopted verbatim:

| Severity | Keyword       | Tailcove level |
| -------- | ------------- | -------------- |
| 0        | Emergency     | `emergency`    |
| 1        | Alert         | `alert`        |
| 2        | Critical      | `critical`     |
| 3        | Error         | `error`        |
| 4        | Warning       | `warning`      |
| 5        | Notice        | `notice`       |
| 6        | Informational | `info`         |
| 7        | Debug         | `debug`        |

PRI encodes both facility and severity as `facility * 8 + severity`; the
facility is stored under `context.facility` but doesn't affect the level.

## rsyslog

rsyslog and syslog-ng (below) are Linux daemons, and these configs assume a Linux server with systemd. macOS's own
`syslogd` and `logger` can't send TLS or structured data, and Windows has no syslog daemon: on either, send with
[Vector](https://tailcove.dev/docs/sending-logs/vector) or [Fluent Bit](https://tailcove.dev/docs/sending-logs/fluentbit), which both have macOS and Windows
builds, or straight over [HTTP](https://tailcove.dev/docs/sending-logs/http-api).

```
# /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")
```

## syslog-ng

```
destination d_tailcove {
    network(
        "ingest.tailcove.dev"
        port(6514)
        transport("tls")
        template("<${PRI}>1 ${ISODATE} ${HOST} ${PROGRAM} ${PID} - [tailcove@41058 token=\"YOUR_INGEST_TOKEN\"] ${MSG}\n")
    );
};

log { source(s_src); destination(d_tailcove); };
```

## Framing

The server accepts both framings a real-world TCP syslog sender might use,
auto-detected per message; you don't need to configure which one your
client uses:

- **Octet counting** (RFC 6587): `MSGLEN SP SYSLOG-MSG`, e.g. rsyslog's
  and syslog-ng's TLS transports.
- **Non-transparent framing**: messages terminated by a trailing `\n`,
  what a plain `nc`/`logger`-style TCP sender typically produces.

## Quick test with `logger`

```bash
logger --rfc5424 --tcp --server ingest.tailcove.dev --port 6514 \
  --sd-id 'tailcove@41058' --sd-param 'token="YOUR_INGEST_TOKEN"' \
  "Hello from logger"
```

(Requires a `logger` build with `--rfc5424`/`--sd-id` support, e.g.
util-linux's, on Linux; BusyBox's `logger` and macOS's don't support structured data.)

## Limits and quotas

The same per-source rate limits, monthly quota enforcement, and
oversize/malformed handling apply as the [HTTP endpoint](https://tailcove.dev/docs/sending-logs/http-api#limits):
once a syslog frame is parsed, it's handled exactly like a line sent over
HTTP. A frame with no resolvable
token, an unknown token, or one that doesn't parse as RFC 5424 is dropped
and logged server-side rather than rejected with a response, since syslog has
no response channel to reject into. After 20 failed tokens (or failed TLS
handshakes) from one IP in a minute, that IP's connection is closed and new
ones are refused until the minute rolls over.
