logwatch - WindyHana's Solanara

목차

개요

설치

root@wl ~ # wget "http://downloads.sourceforge.net/project/logwatch/logwatch-7.4.2/logwatch-7.4.2.tar.gz"
root@wl ~ # tar xvfz logwatch-7.4.2.tar.gz
root@wl ~ # cd logwatch-7.4.2
root@wl ~/logwatch-7.4.2 # sh install_logwatch.sh
#################################
Preparing to install Logwatch
Enter the path to the Logwatch BaseDir [/usr/share/logwatch] :
### Using /usr/share/logwatch
Enter the path for the Logwatch ConfigDir [/etc/logwatch] :
### Using /etc/logwatch
Enter the dir name to be used for temp files [/var/cache/logwatch] :
### Using /var/cache/logwatch
Enter the location of perl [/usr/bin/perl] :
### Using /usr/bin/perl
Enter the dir name to used for the manpage [/usr/share/man] :
### Using /usr/share/man
### Installing
Created symlink for /usr/sbin/logwatch
You need to setup your cron job for logwatch, something like
2 0 * * * /usr/share/logwatch/scripts/logwatch.pl >/dev/null 2>&1
root@wl ~/logwatch-7.4.2 # vi /usr/share/logwatch/default.conf/logwatch.conf1)
root@wl ~/logwatch-7.4.2 # crontab -e2)
2 0 * * * /usr/share/logwatch/scripts/logwatch.pl >/dev/null 2>&1
1) 필요한 설정은 여기서 바꾼다. 바꾸지 않으면 root 로 메일을 보낸다.
2) crontab 에 등록한다

실행

logwatch 는 수동으로 실행할 필요 없는 프로그램이지만, 확인 차원에서 아래와 같이 실행해볼 수 있다.
root@wl ~ # /usr/sbin/logwatch

 ################### Logwatch 7.4.2 (02/27/16) ####################
        Processing Initiated: Wed Mar  2 20:56:32 2016
        Date Range Processed: yesterday
                              ( 2016-Mar-01 )
                              Period is day.
        Detail Level of Output: 0
        Type of Output/Format: stdout / text
        Logfiles for Host: maid
 ##################################################################

 --------------------- lm_sensors output Begin ------------------------

 grep: /proc/cpuinfo: No such file or directory

 ---------------------- lm_sensors output End -------------------------


 --------------------- ZFS Report Begin ------------------------

 Total ZFS pools:   1
 Total filesystems: 7 (7 mounted)
 Total snapshots:   1
 Total volumes:     2

 ------------------- ZFS Pool Summary -------------------

   Pool Name        Size (MiB)  Used (MiB)  Free (MiB)  Dedup
   rpool              152576.0     72806.4     79769.6  1.00x       47%

 --------------------------------------------------------


 ---------------------- ZFS Report End -------------------------


 ###################### Logwatch End #########################
RSS ATOM XHTML 1.0 CSS3