

- #Awstats parsing old log files update
- #Awstats parsing old log files software
- #Awstats parsing old log files plus
#Awstats parsing old log files software
I will address some of the software available in the market today and how we do things in the Firelay platform.

Luckily nowadays there are tools to analyse and relate logs fairly quickly. Thanks to Kilkanen for the methodology to work this out - ie start with the combined format and work forwards.Did you ever have to deal with log files? Did you ever have to find a specific cause of an issue in many, many log files so many, that you didn’t know where to start? Well, as our services and platform grew over the years, we did.
#Awstats parsing old log files update
I haven't gone any further in getting AWStats working, but once I do I'll update this post with anything I find that's tricky. # LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot" # This works with the Nginx combined log format SiteDomain="# Directory where to store the awstats data This parameter is used to analyze referer field in log file and to help AWStats to know if a referer URL is a local URL of same site or an URL of another site. Note that one problem was I had the SiteDomain wrong - I had omitted the "It's to

This extends the /etc/awstats/ file with site specific values. # /etc/nginx/sites-enabled/Īccess_log /var/log/nginx/access.log combined_custom Of course I had to have my server use this configuration. '"$http_referer" "$http_user_agent" $host $request_time $upstream_cache_status' Log_format combined_custom '$remote_addr - $remote_user '
#Awstats parsing old log files plus
This is the standard Nginx combined log format, which maps to awstats LogFormat=1, plus three extra fields I wanted in my logs # /etc/nginx/nf They key problem was I had the AWStats site config incorrect, but I don't think my Nginx log format or my AWStats format string were right either. I finally worked it out, after about 6 hours of effort. Searching new records from beginning of log file.Ĭan anyone spot what's not right? I can't find any additional information or awstats logs that would give further information. Phase 1 : First bypass old records, searching new record. Running '"/usr/share/awstats/-configdir="/etc/awstats"' to update config Ĭreate/Update database for config "/etc/awstats/" by AWStats version 7.0 (build 1.971)įrom data in log file "/var/log/nginx/". Here's the awstats output # /usr/share/awstats/tools/awstats_ now -awstatsprog=/usr/share/awstats/wwwroot/cgi-bin/ HostAliases="LogFormat = "%host %logname %time1 %virtualname %methodurl %code %bytesd %refererquot %uaquot %otherquot %otherquot %otherquot %otherquot" # Other alias, basically other domain/subdomain that's the same as the domain above # Directory where to store the awstats data Anything not here is standard and inherited from the main configuration file # Path to you nginx vhost log file '"$upstream_cache_status" "$sent_http_content_encoding" ' '$status $body_bytes_sent "$http_referer" ' Here's my Nginx log format log_format main '$remote_addr - $remote_user "$host" "$request" ' I've tried many variations and I just can't get it working. I'm having trouble getting AWStats to parse my logs - I suspect it's because I can't get the LogFormat right. I've installed AWStats 7.0 (the latest version in the Amazon Linux repository) to try to get additional information about bandwidth usage.
