🧱 Core Concepts First

πŸ“„ Logs: Messages your system/services write (e.g., login, ssh attempt, sudo usage, nginx error).

These logs need to be:

  1. Collected β†’ from files or services

  2. Processed β†’ filtered, formatted

  3. Stored β†’ saved in a searchable format

  4. Viewed/Alerted β†’ through a UI or alert system


🧰 CATEGORY: Log Collection and Shipping

ToolWhat It DoesRole
syslogGeneric term for standard UNIX-style logging (not a tool)Logging format
journaldPart of systemd. Collects system logs and stores in binaryDefault logger on modern systems
rsyslogA powerful log router. Takes logs from journald/files and sends them elsewhereLog shipper
FilebeatLightweight agent from Elastic. Reads log files and sends to another service (e.g., ELK, Graylog)Log shipper
LogrotateNot a logger β€” it rotates old logs to avoid disk bloatLog maintenance
PromtailLightweight agent from Grafana Labs. Scrapes logs from local files and sends them to Loki.Log shipper

πŸ›‘οΈ CATEGORY: Security Auditing & Intrusion Detection

ToolWhat It DoesRole
FalcoReal-time detection of suspicious behavior using syscalls (via eBPF)Runtime threat detection
auditdKernel-level logging of access to files, syscalls, etc. Very detailedSecurity audit trail
LynisOne-time or scheduled audit of system security (permissions, configs, etc.)Security scanner
RKHunterScans for known rootkits, trojansMalware scanner
ChkrootkitSimilar to RKHunterMalware scanner

πŸ“Š CATEGORY: Log Viewing & SIEM Dashboards

ToolWhat It DoesRole
GrafanaBeautiful dashboards and charts (data visualization tool)UI
LokiGrafana’s log storage/search engine (like Elasticsearch but for logs)Stores & queries logs
GraylogAll-in-one centralized log manager with UI, alerts, parsing, etc.Full SIEM
WazuhFull-featured SIEM with agents and dashboardsSIEM/IDS
KibanaUI for Elasticsearch (used in ELK stack)UI for logs/metrics

πŸ“¬ CATEGORY: Alerting / Reporting

ToolWhat It DoesRole
LogwatchSends daily summary of logs (cron-friendly)Simple email report
FalcoSends alerts on suspicious actionsReal-time alerts
GrafanaCan send alerts based on log queries or metricsAlert platform

πŸ”„ Example: How They Work Together

πŸ’‘Scenario: You want to monitor your server for attacks and logs

Option A – Classic Stack:

System (journald/syslog) β†’ rsyslog β†’ Graylog β†’ [You view in web UI]      
			β†˜β†’ auditd/Falco β†’ alerts                   
			β†˜β†’ Logwatch β†’ daily summary

Option B – Grafana Stack:

journald/syslog β†’ promtail/filebeat β†’ Loki                           
						β†˜β†’ Falco β†’ alerts                           
						β†˜β†’ Grafana β†’ UI for logs + dashboards

🧭 TL;DR Cheat Sheet

ToolLog Collector?Log Viewer?Security Alerts?UI?
journaldβœ…βŒ (CLI only)❌❌
rsyslogβœ…βŒβŒβŒ
auditdβœ…βŒβœ… (raw)❌
Falcoβœ…βœ… (raw logs)βœ…βŒ
Grafana+Lokiβœ…βœ…βœ…βœ…
Graylogβœ…βœ…βœ…βœ…
Wazuhβœ…βœ…βœ…βœ