Logcheck(8)

πŸ“¦
version 1.4.7build1 Β· 6 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– logcheck β€” the manual page, but make it make sense πŸ’–

okay bestie, welcome to logcheck(8) from the System Manager's Manual. yes it's section 8, yes that means it's a sysadmin thing, and yes you're gonna slay it. let's go 🫢


✨ NAME ✨

logcheck β€” the program that scans your system logs for the interesting lines, so you don't have to sit there reading every single one like it's a group chat you got added to by accident πŸ’…


✨ SYNOPSIS ✨

logcheck [OPTIONS]

🌸 DESCRIPTION 🌸

so. the logcheck program? it helps you spot problems and security violations in your logfiles, automatically, and then it e-mails you the results periodically. main character behaviour, honestly. by default logcheck runs as an hourly cronjob just off the hour and after every reboot. no cap. πŸ•βœ¨

logcheck supports three levels of filtering:

  • "paranoid" β€” for high-security machines running as few services as possible. ⚠️ do NOT use this if you can't handle its verbose messages, like genuinely, it will talk a LOT.
  • "server" β€” this is the default, and it contains rules for many different daemons. πŸ‘‘
  • "workstation" β€” for sheltered machines, and it filters most of the messages. cozy vibes.

the way the ignore rules work is additive: "paranoid" rules are also included at level "server", and the "workstation" level includes both "paranoid" and "server" rules. so it's like a stacking situation. every level is bringing the previous levels' whole energy. 🧚

the messages reported get sorted into three layers:

  1. system events
  2. security events
  3. attack alerts

the verbosity of system events is controlled by which level you choose β€” paranoid, server or workstation. BUT β€” and this is important β€” security events and attack alerts are not affected by this. they don't care what level you picked, they're showing up regardless. πŸ’€


🌈 EXAMPLES 🌈

logcheck can be invoked directly thanks to su(8) or sudo(8), which change the user ID. iconic.

the following example checks the logfiles without updating the offset and outputs everything to STDOUT:

sudo -u logcheck logcheck -o -t

πŸ’… OPTIONS πŸ’…

a summary of options is included below, and bestie, we are going through every single one. periodt.

  • -c CFG β€” overrule default configuration file.
  • -d β€” debug mode. πŸ›
  • -h β€” show usage information.
  • -H β€” use this hostname string in the subject of logcheck mail.
  • -l LOG β€” run logfile through logcheck.
  • -L CFG β€” overrule default logfiles list.
  • -D DIR β€” overrule default logfiles lists directory.
  • -m MAIL β€” mail report to recipient. πŸ“§
  • -o β€” STDOUT mode, not sending mail.
  • -p β€” set the report level to "paranoid". brave of you honestly.
  • -r DIR β€” overrule default rules directory.
  • -R β€” adds "Reboot:" to the email subject line.
  • -s β€” set the report level to "server".
  • -S DIR β€” overrule default state directory.
  • -t β€” testing mode does not update offset. πŸ™ˆ
  • -T β€” do not remove the TMPDIR.
  • -u β€” enable syslog-summary.
  • -v β€” print current version.
  • -w β€” set the report level to "workstation".

πŸŽ€ FILES πŸŽ€

  • /etc/logcheck/logcheck.conf is the main configuration file. ✨
  • /etc/logcheck/logcheck.logfiles is the list of files to monitor.
  • /etc/logcheck/logcheck.logfiles.d is the directory of lists of files to monitor.
  • /usr/share/doc/logcheck-database/README.logcheck-database.gz for hints on how to write, test and maintain rules. (yes it's gzipped, yes you have to zcat it, iykyk)

⭐ EXIT STATUS ⭐

  • 0 upon success 🫢
  • 1 upon failure 😭

πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

logcheck is developed by Debian logcheck Team at:

https://salsa.debian.org/debian/logcheck

this manual page was written by Jon Middleton. ty king 🫑


and that's the whole page bestie, Logcheck(8), from the System Manager's Manual, top to bottom, every option accounted for. go read your logs, drink some water, and remember: -o -t is your friend when you just wanna peek without touching anything. mwah πŸ’–βœ¨

πŸ“¦ where this page comes from