LOGWATCH(8)
π LOGWATCH β the logwatch(8) page, bestie edition π
okay so you opened the system log analyzer manpage, and honestly? iconic choice. this is logwatch, section 8 of the User Manuals, and she's about to become your new best friend. grab a strawberry drink π and let's go.
β¨ NAME β¨
logwatch β system log analyzer and reporter π¦
like. she reads your logs. she writes you a report. that's the whole vibe.
πΈ SYNOPSIS πΈ
logwatch [--detail level ] [--logfile log-file-group ] [--service
service-name ] [--mailto address ] [--noarchives] [--range range ]
[--debug level ] [--filename file-name ] [--logdir directory ]
[--hostlimit hosts ] [--hostname hostname ] [--html_wrap number of
characters ] [--hostformat host based options ] [--output output-type ]
[--format report format ] [--subject email subject ] [--encode encoding
to use ] [--numeric] [--version] [--help|--usage]
no cap, that's the whole menu. every single flag below is real and every single one matters π
π DESCRIPTION π
Logwatch is a customizable, pluggable log-monitoring system. she'll go through your logs for a given period of time and make a report in the areas that you wish, with the detail that you wish. main character energy, honestly β she only talks about what you asked about.
she's being used for Linux and many types of UNIX. fr fr, she gets around. π
π OPTIONS π
--detail levelβ this is the detail level of the report, aka how much she's gonna yap.levelcan be a positive integer, orhigh,med,low, which correspond to the integers10,5, and0, respectively. sohigh= 10,med= 5,low= 0. math is math π--logfile log-file-groupβ this forces Logwatch to process only the set of logfiles defined by log-file-group (i.e.messages,xferlog, ...). she'll therefore process all services that use those logfiles. you can specify this option more than once to specify multiple logfile-groups β stack 'em, bestie π«Ά--service service-nameβ this forces Logwatch to process only the service specified in service-name (i.e.login,pam,identd, ...). she'll therefore also process any log-file-groups necessary to process these services. can be specified more than once to specify multiple services to process. a very useful service-name isAll, which will process all services (and logfile-groups) for which you have filters installed.Allis the greedy girlie and we love her π--mailto addressβ mail the results to the email address or user specified in address. inbox delivery, periodt π--range rangeβ you can specify a date-range to process. common ranges areYesterday,Today,All, andHelp. additional options are listed when invoked with theHelpparameter. so like, ask her forHelpand she'll spill the whole list β¨--noarchivesβ each log-file-group has basic logfiles (i.e./var/log/messages) as well as archives (i.e./var/log/messages.?or/var/log/messages.?.gz). by default, Logwatch will search through the archives in addition to the regular logfiles. for values of--rangeother than"all", Logwatch will search the appropriate archived logs. if"--noarchives"is specified, Logwatch will not search the archived logs for any value of"--range". so this one is the "don't dig through the old stuff" button ποΈ--debug levelβ for debugging purposes.leveltypically ranges in value from0to100. this will clutter up your output, so you probably only want to use this when debugging. values of100or more will retain the temporary files (by default, created under/var/cache/logwatch, unless specified astmpdirin thelogwatch.conffile). > heads up: this one gets messy on purpose, that's the point. also100+ leaves temp files behind, so don't be shocked when they're still there π--filename file-nameβ save the output to file-name instead of displaying or mailing it. quiet girlie behavior, respect π--logdir directoryβ look in directory for log subdirectories or log files first before looking in the default directories. VIP entrance only π--hostlimit host1,host2β limit report to hostname -host1,host2. keep it exclusive, bestie βοΈ--hostname hostnameβ use hostname for the reports instead of this system's hostname. in addition, ifHostLimitis set in thelogwatch.confconfiguration file (see MORE INFORMATION, below), then only logs from this hostname will be processed (where appropriate). she'll wear the name you gave her π--html_wrap num-charactersβ number of characters that html output should be wrapped to. default is80. cute little line breaks for your cute little html πΈ--hostformat splitβ use split approach when formatting report for multiple hosts βnone[default],split,splitmail. three flavors, pick your fave π--output output-typeβ report using output-type βstdout[default],mail,file. where does the report go? you decide, queen π--format formatβ format report using format βtext[default],html. plain girl or glowed-up girl, both valid β¨--subject email-subjectβ customize the email subject sent by Logwatch. option--outputmust be set tomail. > yes, you actually have to set--output mailfor this to matter. she's not gonna customize a subject for a report that never gets mailed π--encode encodingβ encode report using encoding βnone[default],base64,7bit,8bit[same as'none']. note that8bitis literally the same asnone, no cap π--numericβ inhibits additional name lookups, displaying IP addresses numerically. no name-dropping, just the raw digits π’--usageβ displays usage information. she tells you how to use her. very communicative π«Ά--helpβ same as--usage. literally the same thing, twins π
π¦ FILES π¦
/usr/share/logwatch/β this directory contains all the perl executables and configuration files shipped with the logwatch distribution. the og home base π/etc/logwatchβ this directory contains local configuration files that override the default configuration. see MORE INFORMATION below for more information. this is where you get to have opinions, bestie π
β EXAMPLES β
logwatch --service ftpd-xferlog --range all --detail high
this will print out all FTP transfers that are stored in all current and archived xferlogs. every single one. she's thorough like that π₯
logwatch --service pam_pwdb --range yesterday --detail high
this will print out login information for the previous day... yesterday's tea, served today β
π MORE INFORMATION π
the directory /usr/share/doc/logwatch-* contains several files with additional documentation:
HOWTO-Customize-LogWatchβ documents the directory structure of Logwatch configuration and executable files, and describes how to customize Logwatch by overriding these default files. the glow-up guide πLICENSEβ describes the License under which Logwatch is distributed. additional clauses may be specified in individual files. read it, it's giving legally-binding β¨READMEβ describes how to install, where to find it, mailing lists, and other useful information. the starter pack π
π AUTHOR π
Kirk Bauer <kirk@kaybee.org> http://sourceforge.net/projects/logwatch
the icon who built her π«Ά
and that's the whole page, bestie. this one shipped on Linux, dated May 2012, and it's still out here analyzing logs like the queen she is. go forth and --detail high responsibly πβ¨π
π¦ where this page comes from
- arch rolling: logwatch 7.15-1 Β· custom
- fedora 43: logwatch 7.15-1.fc43 Β· MIT
- fedora 44: logwatch 7.14-1.fc44 Β· MIT
- fedora 44: logwatch 7.15-1.fc44 Β· MIT
- ubuntu stonking: logwatch 7.14-4ubuntu1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms