Labs / Under Load / Syslog, config backups & NetFlow

Lab 1 of 3 · Syslog, config backups & NetFlow

Central syslog: every device's log in one place

Send every device's log to one syslog server, then take that server down.

Open this lab Pro 6 steps

The idea

webServer, fileServer and coreRouter, a Router, push their log lines to logServer, one collector, a syslog server, which sorts them by host and severity. A laptop sits in the office.

Two names in one datagram
Two names in one datagram
The collector is down
The collector is down

Steps

  1. A log line travels to the collector

    Logs kept on each device are scattered, and lost with the device, so devices send them to one place. Like an SNMP trap, a log line is the device speaking first. Log one line on webServer while logServer records UDP Port 514.

    webServer:~# logger 'disk almost full'
    logServer:~# cat /var/log/remote/webServer.log
  2. Facility and severity: the PRI number

    Each line says how serious it is, so a collector can sort and filter. Each message starts with a number, the PRI: facility × 8 + severity. Severity runs from 0 (emerg) to 7 (debug); lower is worse. auth (logins) is facility 4, crit severity 2.

    webServer:~# logger -p auth.crit 'Failed password for root'
    logServer:~# tail -1 /var/log/remote/webServer.log

Pro

4 more steps in the app

  1. One file per host
  2. The host name is only a claim
  3. Filtering by severity
  4. When the collector is down
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab