How to View and Delete NetApp Storage qtree, Get statistics about Filer Volume Read / Writes operations and delete and show mounted volumes.Improve SSL security: Generate and add Diffie Hellman key to SSL certificate for stronger line encryption.Linux: Howto Disable logging for all VirtualHosts on Apache and NGINX Webservers one liner.Get daily E-Mail Reports statistics on postfix Linux mail server.Short SSL generate new and self-signed certificates PEM, view and convert to and from PKCS12 to java key store cookbook commands cheat sheet.How to configure multiple haproxies and frontends to log in separate log files via rsyslog.Password Protecting single file with htaccess password / Securing single executable in Apache with password through htaccess.How to install Awstats Apache weblog statistics on Debian Squeeze GNU Linux.I believe the script can be quite useful to the administrators out there who are looking for a quick way to generate awstats statistics from their many domain log files. You can read the article configuring multiple awstats for multiple domain on dreamhost here. The idea for the script hit me, before a week time, after I’ve red an article which explains how to achieve something similar to what the script does manually. It generates a number of configuration files to be later red by awstats and after finishing, invokes awstats to generate the statistics from the previously generated awstats domain configuration files.įinally the script generates an html files with links to each of the domains for whom awstats has generated statistics. The script takes all subdirectories from /var/log/apache2 assuming that each of the subdirectories contains access.log and error.log file names. You have to follow the instructions in the commented head of the script.Īfter you have properly configured the script all you have to do is set it to be executed via crontab.Īgain in the script head I’ve included information with an example on how to add it to a crontab. The usage of the script is quite self explanatory. You can download the script to generate statistics from multiple log files awstats_generate_multiple_sites.sh from here. This may be caused by a number of reasons, but it turned out that the merged log requires a specific LogFormat: LogFormat="%time2 %other %method %url %query %other %logname %host %ua %code %other %other %other"įinally, I created a batch file awstats.cmd to update all my statistics net use z: \\host\LogFiles awstats /user:awstatsĪnd created a scheduled task to automatically execute the script every day.I’ve created a small shellscript that allows the administrator to build log statistics for multiple domain names. Searching new records from beginning of log file. Unfortunately, the merged log only resulted in “dropped” and “corrupted” records: Phase 1 : First bypass old records, searching new record. #LogFile="\\path\to\LogFiles\W3SVC1\u_ex%YY-1%MM-1?-1.log"Īgain after deleting the previously generated data files. Replace the LogFile entry in your config file(s) to point to the merged log file LogFile="C:\awstats-data\merged.log" Things should be running by now if you browse to I noticed that the stats only included data from the installation date (IIS logs are configured to daily log files).Īnswers on the internetz suggest to merge old log files using, a script that ships with awstats.Ĭ:\awstats\tools>perl > merged.log In the site or application, you need to add a Script Map for *.pl executing
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |