Back to Blog
Awstats graphgooglechartapi6/12/2023 Data collection and statistics calculation Manual method ![]() The Debian awstats package includes the file /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh which starts the update of statistics before log rotation. Log rotation (logrotate)ĭata collection must be done before the automatic logs are rotated, otherwise you will lose data. You can find all awstat configuration directives on the official website. It’s necessary to create the configuration for the website to be analyzed: Target domain, location of the access.log file, as well as its domain Aliases (e.g. ![]() The AWSTATS script is a program written in Perl, executed by the apache2 server. ) and build the related Apache virtualhost. But I can only specify one domain in SiteDomain, even though I host several domains on my machine.(**) Translated with AWSTATS and GeoIP perl installation apt-get install apache2 awstats libgeoip1 libgeoip-devĭetermine the domain name that will be used to consult the statistics (e.g. If I specify a SiteDomain in the AWStats configuration, emails from this domain is shown as "Local" in the statistics. What I can't figure out is how AWStats determines whether an sender is local or external. If you check the sample statistics, it splits statistics for senders & receivers in two groups, Local & External. This would have the effect that the SMTP Error codes never shows error codes given by hMailServer - only error codes giving by the receiving servers.īut then email from external servers to users on the hMailServer machine wouldn't be logged at all, which would be very confusing as well. Not when it receives messages from other servers. So my best bet right now is that hMailServer should only log when it sends messages to other servers. For example, the SMTP Error codes statistics would contain error codes both from hMailServer, and from some external server. If hMailServer would count both received / sent and put them both in the Mail succesfully sent column, it would be very confusing. If you look on the statistics, it counts Mail successfully sent but there doesn't seem to be a mail succesfully received. I've already managed to create a log which AWStats can parse.Īnyway, there's still a couple of things that I can't figure out.ĪWStats seems to be made only for outgoing SMTP traffic, not incoming. I think we're misunderstanding eachother. That's how the Apache logs work anyway.Īs for the log format, I played with AWStats and hMail logs a while back trying to figure a way to make it work, and I believe it requires a one line detail of the mail action performed (not like hMail currently where there are multiple lines) I could be wrong but that was my impression. I *think* that it is not necessary to delete the file after parsing (unless it is just too darn big) If I remember correctly, AWStats will remember it's place in the log file and pick up from there the next time. So when you want to update your statistics, you take a copy of the file, delete the original, parse the statistics in the copy, and then delete the copy. If you check this, hMailServer will create a log file with a fixed name (hmailserver_awstats.log) which awstats records will be written to. Martin wrote:Perhaps it would be a better idéa to add a checkbox on the logging page named "Enable AWStats log".
0 Comments
Read More
Leave a Reply. |