Logs & Statistics in Plesk
Statistics in Plesk
The Server Statistics Settings of Plesk can be accessed from the Statistics section of Tools & Settings.
In the Server Statistics Settings of Plesk, you can configure the storage settings for logs and statistics that domains generate. These settings do not usually affect how the web statistics engines work - only how often logs are rotated and how long they are kept.
Retain web and traffic statistics for X months.
This is how long logs should be preserved after they have been processed. Generally, three months is a reasonable amount of time to wait before deleting logs, so make sure you let your customers know they should be downloaded by that time if they will be needed (such as for processing with a third-party application).
Plesk logs can be managed per domain by navigating to the Websites & Domains tab, expanding the Additional Operations drop-down arrow if necessary, then selecting Logs.
It's a good idea to make sure logs are rotated frequently because rotated logs can be compressed to preserve disk space, and shorter logs are easier to search. You can either choose to rotate by time or by size. For servers that are relatively busy, you may want to rotate logs when they reach 50MB (1024 \* 50 = 51200 KB) to prevent logs from filling up available disk space, especially during an attack.
Maximum number of log files
This setting determines the number of log files that will be available on the server at any time. A value of 5, which is a good default, will allow one active log and four rotated logs at a time; when the current active log is rotated and the maximum number to be retained has been reached, the oldest log file will be deleted. If you set the log size to 50MB earlier, there will be a maximum of 250MB of uncompressed log files at any time, which fits nicely inside the account's quota we set in the Hosting Parameters tab.
Compress log files
You can direct the server to compress all preserved logs to even further conserve space. This is a very good idea, especially if you have increased the maximum log size, because logs are mostly text and compress very well. This option will have no effect if you do not have log rotation enabled.
E-Mail log files
Plesk can be directed to email a copy of any log files after they have been processed an email account you specify. In a Hosting Plan, this should probably be unset unless you are archiving log files off-site somewhere; leave this blank for now.
Next: Applications in Plesk