Webアクセスログ解析(AWStats)のインストール.
AWStatsをインストールします。
[root@www ~]# dnf -y install awstats
[root@www ~]# vi /etc/awstats/awstats.fedoraserver.jp.conf
LogFormat=1
SiteDomain="fedoraserver.jp"
HostAliases="localhost 127.0.0.1 REGEX[^.*fedoraserver\.jp$] REGEX[^192\.168\.1\.]"
[root@www ~]# vi /etc/httpd/conf.d/awstats.conf
Require ip 192.168.1.1/24
[root@www ~]# systemctl restart httpd
[root@www ~]# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=fedoraserver.jp -update
http://fedoraserver.jp/awstats/awstats.pl
メールログ解析(Pfiogsumm)のインストール.
pflogsumm をインストールします。
[root@www ~]# dnf -y install postfix-perl-scripts
[root@www ~]# perl /usr/sbin/pflogsumm -d yesterday /var/log/maillog Postfix log summaries for Jul 29 Grand Totals ------------ messages 8 received 8 delivered 2 forwarded 1 deferred (1 deferrals) 0 bounced 0 rejected (0%) 0 reject warnings 0 held 0 discarded (0%) 2428k bytes received 2429k bytes delivered 3 senders 2 sending hosts/domains 2 recipients 2 recipient hosts/domains Per-Hour Traffic Summary ------------------------ time received delivered deferred bounced rejected -------------------------------------------------------------------- 0000-0100 0 0 0 0 0 0100-0200 0 0 0 0 0 0200-0300 0 0 0 0 0 …
[root@www ~]# crontab -e
[root@www ~]# 00 01 * * * perl /usr/sbin/pflogsumm -e -d yesterday /var/log/maillog | mail -s 'Logwatch for Postfix' root
コメント