When people visit my site they click on links that associate their
connection (0=dialup and 1=broadband). In the exaple access log there are 233 queries, 213 of which = 1 (and therefor 20
instances of connection=0). However AWStats only lists 14 hits with a value of '1' and never reports hits with a query value of '0'.
I have used the regex tester on this site, The Regulator (application which also allows testing), and all of my examples triggered correctly both here and in the program so I'm at a loss at the moment! Here is
what I have…
A fix and another bug…
Commenting this in the main script will allow the detection of zeros and I haven't noticed any slow down in the compilation of logs.
#delete $hashforselect->{0};
The next bug is that there are over 200 instances in the access log I'm using though the script only detects 21 instances of the connection query. Any idea why this might be happening?
That's probably not another bug, but a configuration problem. Three things come to my mind:
1° If part of the log file was already processed, AWStats will not reprocress it when you run a new update. I mean that when you change the extra section, you need to erase the existing AWStats database files before you run a new update if you want that the change in extra section is effective for the complete log file.
2° Double-check the ExtraSectionCodeFilter1, ExtraSectionCondition1 and ExtraSectionFirstColumnValues1 to be sure that 200 records match these.
3° I never tested the fix you suggested. Let's hope it is not the source of the "second bug".
I always delete the logs AWStats generates when I need to test changes and recompile the logs via AWStats. I think my recyling bin is getting a little full actually!
Yes, the extra is taking HTTP code 200s. I haven't modified that.
Will the extra HTTP query detection work if the query isn't the only query (for example audio is another common query that connection will appear with unless someone manually changes the connection specifically which is rare).
This seems to get a more accurate count however I have to spend more time confirming. AWStats detected 12 instances and I counted 11 manually. What do you think?
This is confusing. Why do you mix up REFERRER and URL (or QUERY) within the same condition ? If you want both, it would probably be more clear to use two different extra sections, one showing a report about REFERRERS and the other about QUERY.
AWStats detects only six (6) instances. The only relatively close statisical guess I have is that seven (7) though I don't see any matching patterns there. I feel as though I'm staring directly at the issue but I really don't get AWStat's algorithems for figuring stuff out.
There are a total of 8 instances. By default AWStats counts 7. When I remove any line it adds up to 6. However after testing the log by deleting a single line and testing no single line removed keeps the count at 7.
Are you still talking about the same extra section ? I get the feeling that we are running after a moving target…
Note that in your previous example (with the 9 instances), two lines didn't have the referrer and user agent fields at the end. I am not sure that AWStats can accept these lines. They could be considered as corrupted records.
slick-willy made a suggestion that worked though when I went back to test against the original logs (including both rules from him and you) I got the same exact results.
Here are the lines and the two rules for BOTH audio and connection… 65.208.187.194 – - [31/Jan/2008:18:43:28 +0000] "GET /home/?audio=1&connection=0 HTTP/1.1" 200 591 "http://www.jabcreations.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
You've got a better comprehension of regular expressions then myself so don't sweat it. I failed to realize because I was so exhuasted towards the end of my night last night that yes, the "missing" hits were in January.
It looks fine now I think. I'll put up a private working example for January after I setup the restof the extra filters if you want. There are all sorts of interesting things I'm interested in that I was unaware that I could so easily track with AWStats.
"Trying is the first step towards failure." - Homer Simpson 🙂