Log stop detection

When a server stops sending logs, it doesn't send a log about it. The agent died, rsyslog can't reach the collector, a firewall rule changed, the box is off. From the log server's side, all of those look the same: nothing.

You find out by knowing what should arrive and noticing when it doesn't.

Free 14-Day Trial
**No credit card required.

What silence looks like

On the collector, a stopped server is a host whose last line is getting older. In any log tool, search for the host and look at the newest line. Two hours old on a busy web server is a problem. Two hours old on a backup box that logs twice a night is normal.

On the server, start with the sender itself:

systemctl status rsyslogjournalctl -u rsyslog --since -1h

rsyslog logs its own errors there, including when it can't reach the collector. If you forward over TCP, check that the connection is up (203.0.113.10 is the collector here):

ss -tn dst 203.0.113.10

No line means no connection. Over UDP there is no connection to check, and the sender never finds out its lines are lost. Then send one test line and search for it on the other side:

logger -t trunc-test "hello from $(hostname) $(date +%s)"

If it arrives, the path works and whatever stopped is on the logging side of the server (the service, its config, a facility list). If it doesn't, follow the path: the sender, the network, the collector. More on this test in testing your logging with logger.

Common causes, and how to tell them apart

Common reasons a server stops sending logs, what you see on the server, and the fix
Cause On the server Fix
rsyslog or the agent stopped systemctl status rsyslog shows it inactive or failed. Local log files may still grow. Start it, then read its journal for why it stopped
Disk full df -h /var at 100%. Local files stop growing, and a queue that spools to disk can't. Free space, then restart the sender
Firewall or network change The sender is running, but ss -tn shows no connection to the collector, or the test line never arrives The rule, the route, the security group
The collector's address changed The sender points at an old IP, or a name that resolves somewhere else now Update the target, restart the sender
The host is down Nothing answers The host
A config change dropped a facility auth,authpriv.* @@203.0.113.10 in place of *.*. Auth lines still arrive, cron lines don't. Add cron.* or go back to *.*

The last row is a partial stop. The server keeps logging, so nothing about the server looks wrong, and only one kind of line goes missing. That's the case cron monitoring catches.

How fast you need to know

A web server that logs every second: an hour of silence is already long. A backup box that logs twice a night: a day is fine. One threshold for everything either cries wolf on the quiet servers or misses the busy ones for far too long. So there are two alerts.

What Trunc checks

The two Trunc alerts for a server that stops sending logs, when each one fires and where it is sent
Alert Fires when Sent to
Server went quiet A server that logged nearly every hour for 7 days sends nothing for 60 minutes, while your other servers are still sending Email or Slack
Logging Stopped Once a day: a server that sent more than 20 lines the day before (UTC) has sent nothing that day Email or Slack

Server went quiet is for always-on servers: laptops and desktops are left out, and you can turn it off per server. Its email says when we last heard from the server and what to check:

No logs from db01 since 14:02 PST (60 min ago).Other servers in this account are still sending logs.Check that db01 is up and that its TRUNC agent or syslog is running and can reach TRUNC.

Logging Stopped is the slower check, by email or Slack. Once a day it looks for servers that sent more than 20 lines the previous day (UTC) and nothing so far today. That catches a server that was logging normally and then went silent for a full day. A server that stops early in the day, after 20 lines or fewer, isn't reported. For servers that log nearly every hour, Server went quiet is the fast path and tells you within the hour. Logging Stopped is on by default for new accounts; its settings are under Settings > Alerts.

Both are part of missing log alerts in Trunc, together with the alert for a single cron job that didn't run.

When every server goes quiet at once

Several servers going quiet at the same time is usually one thing on the path: the firewall, the syslog relay, the collector's address. Check that before you log in to six servers.

Server went quiet only fires while your other servers are still sending, so it stays out of this one. Logging Stopped lists the servers that sent more than 20 lines the day before and nothing since in its daily alert, and Operational Insights shows which sources dropped off and when, over a day, a week or a month.

Limits

  • We see that lines stopped, not why. The causes table is where you start.
  • Processing time. Both alerts go by when we received and processed the lines, not the timestamps inside them.
  • Small senders. A server that logs 20 lines a day or fewer is never reported by Logging Stopped, and it doesn't log often enough for Server went quiet either. Give it a heartbeat in root's crontab:
*/30 * * * * logger -t heartbeat ok

That's 48 lines a day, plus the cron line for each run, and the heartbeat itself becomes a schedule we watch.

Simple, Affordable, Log Management and Analysis.

14 days free trial. No credit card required.