Syslog messages (syslog)
Counts the syslog messages that a device sent to the probe, in a sliding window, optionally only those of certain facilities, at least a severity, from one program or matching a pattern, and keeps the matching ones on the sensor's page. Use it for what a device logs and polling cannot see: failed logins, a service that restarted, a disk that reported errors, a firewall rule that fired. RFC 5424 and RFC 3164 are read, over UDP and TCP.
It is the other kind of sensor: it listens instead of asking. The listening is shared by every receiver sensor on the probe and is described, with its limits and what the probe needs, in Receivers: SNMP traps and syslog. This page is about the sensor.
What it looks like

The sensor's page after a few polls, with the messages it matched listed above the channels. Five messages were sent from a gateway; the sensor asked for authentication facilities at warning or worse that mention a failed login, and matched three. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.
How it counts
Each poll asks the receiver for the messages that came from the device's address (and extra_sources) in the last window_secs, keeps those that match every filter that is set, and reports how many. A message counts at every poll until it is older than the window. So:
- With the default limit on
matched(a warning above 0), the sensor is Warning for as long as a matching message is in the window, and Up again when none is.state_on_match: downmakes it Down instead, and the sensor's failure count then decides when that becomes an incident, as for any other sensor. - The window should be at least as long as the poll interval. A message that arrives and ages out between two polls is never seen. The default window is 300 s for a 60 s interval.
- Messages that arrived before the sensor's first poll are not seen, and neither are those that arrive while the probe is down.
Matching is by source address alone, not by the host name in the message, which a sender can write as it likes. A device that sends from another address than the one it is monitored on needs that address in extra_sources. A message from an address no sensor names is dropped before it is read.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
matched | Matching messages in the window | none | warning above 0 |
received | Messages received in the window | none | none |
dropped | Dropped by the rate limit | none | warning above 0 |
unreadable | Empty or unreadable | none | warning above 0 |
since_last_match_s | Time since the last match | s | none; unknown when nothing matched |
received counts every message from the device in the window, whether it matched or not. dropped is what the rate limit cut off (the device sends faster than 100 a second, by default); when it is not 0 the counts are a minimum, and the sensor's message says so. To count only, without the sensor going to Warning, raise the limit of matched on the sensor's page, or set it to none.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
window_secs | 300 | How far back each poll counts, 10 to 86400. The receiver keeps messages for an hour by default (PROBEWARD_RECEIVER_RETENTION_SECS); a longer window than that is cut to it, and the message says so. |
facilities | none (every facility) | Count only these facilities, by name (kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, ntp, security, console, local0 to local7) or number (0 to 23). |
severity_at_least | none (every severity) | Count only messages at least this severe, by name (emerg, alert, crit, err, warning, notice, info, debug) or number (0 to 7). err counts emerg, alert, crit and err. |
program | none | Count only messages from this program (the RFC 3164 tag or the RFC 5424 APP-NAME), compared without regard to case. |
pattern | none | A regular expression the message text must match. |
exclude_pattern | none | A regular expression that takes a message out when its text matches. |
extra_sources | none | More addresses the device sends from. Up to 16. |
state_on_match | count | count: only the channels and their limits decide. warning or down: the sensor is in that state while something matched in the window. |
Suggested interval: 60 seconds. No credential. The regular expressions use the Rust regex syntax, which has no look-around or backreferences, with a size limit. They are tested against the message text only, not the host or the program.
What is read
| Format | How it is told | What is taken from it |
|---|---|---|
| RFC 5424 | <PRI>1 TIMESTAMP HOST APP PROCID MSGID [structured data] message | facility, severity, time stamp, host, program, process id, message id, the message (a leading byte order mark is removed; the structured data is skipped) |
| RFC 3164 | <PRI>Mmm dd hh:mm:ss HOST tag[pid]: message, as far as it can be read | facility, severity, time stamp, host and tag when present, the message |
| Anything else | no priority, or a header that cannot be read | the whole text is the message, facility user, severity notice |
A message is cut to 2,048 characters and control characters are replaced or removed. Over TCP, messages are cut apart as RFC 6587 describes: octet-counted (123 <msg>) when a stream starts with a number and a space, otherwise one message per line; a frame over 16 KiB, or a count that makes no sense, closes the connection. The receiver listens on UDP and TCP on the same port; PROBEWARD_SYSLOG_TCP=off stops the TCP listener. TLS is not implemented; see Receivers for terminating it in front of the probe.
Devices that send no priority. A sender that leaves out <PRI> has no facility or severity for the sensor to filter on, and all its messages read as user.notice. MikroTik RouterOS does this in its default remote log format (remote-log-format=default): a message arrives as system,info,account user admin logged in ..., with the topics in the text. Filter such a device on pattern (for example ^system,.*account), or set the device to a format that sends the priority.
What is kept for each message
The sensor page lists the messages the sensor matched, newest first, 50 at a time, and GET /api/v1/sensors/{id}/events returns the same. A line is auth.err sshd: Failed password for admin from ..., with a badge for the severity (emergency to error is Down, warning is Warning, the rest Up). Behind each line is the parsed message:
{
"source": "192.0.2.1",
"facility": "auth",
"severity": "err",
"message": {
"facility": 4, "severity": 3, "rfc": 3164,
"timestamp": "Nov 30 10:15:02", "hostname": "gateway", "app": "sshd", "procid": "2211",
"message": "Failed password for invalid user admin from 198.51.100.7 port 51234 ssh2"
}
}A sensor keeps at most 1,000 messages, and the timeline's retention applies. Messages are shown as plain text. What a device writes into a log line is stored as it wrote it, so a program that logs a password puts it in the message; Probeward does not look for them. Filter such lines out with exclude_pattern, or fix the program.
What the probe needs
UDP and TCP port 514, which are privileged on Linux, and a firewall that lets the device in. See what the probe needs for the capability, an unprivileged port and a container. In short, on a packaged install:
# systemctl edit probeward.service (or probeward-probe.service for a remote probe)
[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICEor PROBEWARD_SYSLOG_LISTEN=0.0.0.0:10514 and the devices pointed at port 10514 (UDP and TCP).
Failures
| Message | Meaning |
|---|---|
cannot listen for syslog on UDP 0.0.0.0:514: permission denied ... (kind config) | See what the probe needs. |
cannot listen for syslog on UDP ...: another program on this host holds it ... (kind config) | rsyslog or another log daemon has the port. Stop it, or set PROBEWARD_SYSLOG_LISTEN. |
this probe already watches N devices for syslog messages, the most it keeps (kind config) | PROBEWARD_RECEIVER_SOURCES is reached. |
A TCP port that cannot be opened does not fail the poll: the sensor's message says syslog over TCP is not listening on port N: ... UDP is. Nothing else fails a poll. No messages is a reading: matched is 0.
Verification
- Real devices. A MikroTik RouterOS Cloud Hosted Router and a VyOS router sent syslog over UDP to a probe listening on port 514. RouterOS sent no priority and no host or tag (read as
user.notice, the whole line as the message,system,info,account user admin logged in ...); VyOS sent RFC 3164 with host and tag (auth.info sshd: Failed password for ...,authpriv.notice sshd: pam_unix(sshd:auth): authentication failure ...). The messages were provoked by logging in over SSH (and failing to), and by adding and removing an interface. The live test iscrates/probeward-sensors/tests/live_receivers.rs. - Real sockets on loopback, for both formats over UDP, and over TCP with newline framing and with octet counting; a TCP peer nobody watches closed without being read; a flood of 300 datagrams cut at the rate limit and counted; one device's flood leaving another's allowance alone; a port held by another program and a privileged port named in the failure.
- Hand-written messages for the reader: RFC 5424 with structured data containing escaped brackets, nil fields, a missing message, RFC 3164 with a padded day and with no host, no priority, a priority out of range, bad UTF-8, control characters, very long lines.
- The filters (facility names and numbers, severity as "at least", program without regard to case, pattern and exclude pattern, all together), windows, events once and the sensor states are tested against a scripted receiver, and the limits, retention and byte budget in the store with a scripted clock. See Receivers and the acceptance scenarios.
- Not seen: RFC 5424 from a real device, syslog over TCP from a real device, a Windows event forwarder, IPv6 senders, a device that sends faster than the limit, TLS (not implemented).
The live test and its variables are described on the SNMP trap sensor's page.