0

OS: Ubuntu 20.04.1 LTS logwatch 7.5.2-1ubuntu1

I have following config for logwatch:

/etc/logwatch/conf/logwatch.conf

Output = mail
Detail = high
MailFrom = logwatch
Range = yesterday
Service = All

/etc/logwatch/conf/logfiles/null.conf

LogFile = /dev/null

/etc/logwatch/conf/services/sshd.conf

LogFile =
Logfile = null
*JournalCtl = "--output=cat --unit=ssh.service"

I am receiving the logwatch email, but it does not contain any ssh info.

John Siu
  • 4,695
  • 2
  • 25
  • 22

1 Answers1

0

After going through some old support email in logwatch sourceforge site and some testing, following settings works:

/etc/logwatch/conf/logfiles/null.conf

LogFile = null.log

Create /var/log/null.log with an empty line.

Then logwatch work correctly for ssh.service.

John Siu
  • 4,695
  • 2
  • 25
  • 22