memo.xight.org

日々のメモ

AWStats で postfix, squid のログを解析

awstats.postfix.conf

LogFile="perl /usr/share/awstats/tools/maillogconvert.pl standard < /var/log/maillog |"
LogType=M
LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"
SiteDomain="example.com"
DNSLookup=2
DirData="/var/lib/awstats"
DirCgi="/awstats"
DirIcons="/awstatsicons"
EnableLockForUpdate=1

# 閲覧を許可するIPアドレスの範囲
AllowAccessFromWebToFollowingIPAddresses="192.168.0.1-192.168.0.254"
Lang="jp"

LevelForBrowsersDetection=0
LevelForOSDetection=0
LevelForRefererAnalyze=0
LevelForRobotsDetection=0
LevelForSearchEnginesDetection=0
LevelForKeywordsDetection=0
LevelForFileTypesDetection=0
LevelForWormsDetection=0

ShowMonthStats=UHB
ShowDaysOfMonthStats=HB
ShowDaysOfWeekStats=HB
ShowHoursStats=HB
ShowDomainsStats=0
ShowHostsStats=HBL
ShowRobotsStats=0
ShowEMailSenders=HBML
ShowEMailReceivers=HBML
ShowSessionsStats=0
ShowPagesStats=0
ShowFileTypesStats=0
ShowFileSizesStats=0
ShowOSStats=0
ShowBrowsersStats=0
ShowOriginStats=0
ShowKeyphrasesStats=0
ShowKeywordsStats=0
ShowMiscStats=0
ShowHTTPErrorsStats=0
ShowSMTPErrorsStats=1

awstats.squid.conf

LogFile="/var/log/squid/access.log"
LogType=W
LogFormat=4
SiteDomain="example.com"
DNSLookup=2
DirData="/var/lib/awstats"
DirCgi="/awstats"
DirIcons="/awstatsicons"
EnableLockForUpdate=1

# 閲覧を許可するIPアドレスの範囲
AllowAccessFromWebToFollowingIPAddresses="192.168.0.1-192.168.0.254"
Lang="jp"

LevelForBrowsersDetection=0
LevelForOSDetection=0
LevelForRefererAnalyze=0
LevelForRobotsDetection=0
LevelForSearchEnginesDetection=0
LevelForKeywordsDetection=0
LevelForWormsDetection=0

ShowDomainsStats=0
ShowRobotsStats=0
ShowFileSizesStats=0
ShowOSStats=0
ShowBrowsersStats=0
ShowOriginStats=0
ShowKeyphrasesStats=0
ShowKeywordsStats=0

Reference

Awstats(ログ解析)/Fedora Core4
http://www.shitomi.jp/fc4/awstats.html