Build a dataset first (simulates an attack on two hosts plus normal traffic):

# brute force on client1 from 203.0.113.5 (8 attempts), on client2 from 198.51.100.9 (3 attempts)
for i in 1 2 3 4 5 6 7 8; do docker exec client1 logger -p auth.warning -t sshd "Failed password for invalid user admin from 203.0.113.5 port 40$i ssh2"; done
for i in 1 2 3;           do docker exec client2 logger -p auth.warning -t sshd "Failed password for root from 198.51.100.9 port 50$i ssh2"; done
docker exec client2 logger -p auth.info    -t sshd "Accepted password for alice from 10.0.0.7 port 6000 ssh2"
docker exec client1 logger -p auth.err     -t sudo "bob : 3 incorrect password attempts ; COMMAND=/bin/bash"
docker exec client1 logger -p daemon.crit  -t nginx "worker process exited on signal 11"
docker exec client2 logger -p daemon.info  -t cron  "job backup finished"
docker exec client2 logger -p user.notice  -t myapp "user login ok"
sleep 2

Analysis commands (log line format: time host facility.severity tag: message):

docker exec -it logserver bash
cd /var/log/remote

# ---------- overview ----------
wc -l all.log
awk '{print $2}' all.log | sort | uniq -c                          # events per HOST
awk '{print $3}' all.log | sort | uniq -c | sort -rn               # facility.severity counts
awk '{split($3,a,"."); print a[2]}' all.log | sort | uniq -c       # SEVERITY only

# ---------- repeated authentication failures ----------
grep -c "Failed password" all.log                                  # total failures
grep "Failed password" all.log | awk '{print $2}' | sort | uniq -c                        # per AFFECTED HOST
grep "Failed password" all.log | grep -oE 'from [0-9.]+' | sort | uniq -c | sort -rn      # per SOURCE IP
grep "Failed password" all.log | grep -oE 'for (invalid user )?[a-z]+' | sort | uniq -c   # targeted usernames
grep "Failed password" all.log | awk '{print $2, $0}' | grep -oE '^client[0-9]+ .*from [0-9.]+' | awk '{print $1, $NF}' | sort | uniq -c   # host + IP

# ---------- successful logins and sudo ----------
grep "Accepted password" all.log
grep -i "sudo" all.log

# ---------- severity: warning and worse (err, crit, alert, emerg) ----------
grep -E "\.(emerg|alert|crit|err|warning)" all.log
grep -E "\.(crit|err)" all.log                                     # serious only

# ---------- timeline of one attacker ----------
grep "203.0.113.5" all.log | awk '{print $1, $2}' | head

exit

If the examiner supplies a log file (for example auth.log or syslog), run the same commands on it:

F=supplied.log
grep -c "Failed password" $F
grep "Failed password" $F | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | sort | uniq -c | sort -rn
awk '{print $4}' $F | sort | uniq -c | sort -rn | head          # hostname column in traditional syslog
grep -iE "error|crit|fail|denied|invalid" $F | head -20

Syslog severity levels (lower number = more severe):

Code	Name	Code	Name
0	emerg	4	warning
1	alert	5	notice
2	crit	6	info
3	err	7	debug

Answer format: “Host client1 shows 8 Failed password events at severity warning from 203.0.113.5, targeting admin; client2 shows 3 from 198.51.100.9. Repeated failures from one IP in a short time indicate a brute-force attempt. A crit event was logged on client1 by nginx.”