User Tools

Site Tools


log_configuration

If you want to send us your comments, please do so. Thanks
More on comments


Log configuration

See also our Log analyses page

Logcheck

In /etc/logcheck/logcheck.conf turn the 2 * * * * line off by placing a # in front of it. Now only a check is done at reboot
syslog-summary . Set SYSLOGSUMMARY=1 in /etc/logcheck/logcheck.conf

Errors

logcheck logcheck -m root -t

Can't locate Proc/WaitStat.pm in @INC (you may need to install the Proc::WaitStat module)
(@INC contains:
/usr/lib/perl5/site_perl/5.22.3/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.22.3
/usr/lib/perl5/vendor_perl/5.22.3/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.22.3
/usr/lib/perl5/5.22.3/x86_64-linux-thread-multi
/usr/lib/perl5/5.22.3 /usr/lib/perl5/site_perl/5.22.3
/usr/lib/perl5/site_perl/5.22.3/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.22.3
/usr/lib/perl5/vendor_perl/5.22.3/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl .)
at /usr/bin/mime-construct line 30.
BEGIN failed--compilation aborted at /usr/bin/mime-construct line 30.

Install

  • perl-IPC-Signal
  • perl-Proc-WaitStat
Can't exec "sendmail": No such file or directory at /usr/bin/mime-construct line 547.
mime-construct: can't run sendmail: No such file or directory
Error closing sendmail: non-zero exit (2) at /usr/bin/mime-construct line 559.

Install

  • sendmail

Logrotate

Change the logging of programs. Goto

/etc/logrotate.d

Open the configuration file of the program for which you want change the logging for.
Mostly you want to change the rotate interval and the number of log files retained.
For the interval you can use

daily weekly monthly yearly

For the number of log files to retain you change the number in (in this example 12)

rotate 12

into the number you want.
Warning: When changing logrotate it is possible that old logs might be removed

Example

/var/log/apache2/*.log {
      daily
      missingok
      rotate 14
      compress
      delaycompress
      notifempty
      create 640 root adm
      minsize 1M
      size 10M
      sharedscripts
      prerotate
              if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
                      run-parts /etc/logrotate.d/httpd-prerotate; \
              fi; \
      endscript
      postrotate
              if invoke-rc.d apache2 status > /dev/null 2>&1; then \
                  invoke-rc.d apache2 reload > /dev/null 2>&1; \
              fi;
      endscript

More info

In the man page

man logrotate

Creating logfile archives with logrotate

Syslog coloring

lwatch

rsyslog error

If you get something like (replace aptitude with what is in the error message

error: rsyslog:25 duplicate log entry for /var/log/aptitude

then check the files in

/etc/logrotate.d/

with

grep -ir 'aptitude' /etc/logrotate.d/*

There will probably two or more lines. Edit the files so there is only one file in which aptitude (or what is in the found grep output)

Pre systemd boot logging

To save the information from the system boot install bootlogd. The log can be found in /var/log/bootlog
To show the result use

sed 's/\^\[/\o33/g;s/\[1G\[/\[27G\[/' /var/log/boot | less -r

Source: Display file with escaped color codes - boot messages from bootlog daemon On systems with systemd the logcheck package can be used to get the bootlog info in the local mailbox

Linux security logcheck
Linux tips log everything


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
log_configuration.txt · Last modified: 02-07-2020 20:51 by wim