|
#1
•
besim
No country statistics with logfiles with pre-resolved host-addresses
Hello,
because I'm calculating extremely big logfiles I'm doing pre-resolving the logfiles with another tool to replace dns-resolvable ip-addresses with the corresponding hostname. This makes a problem in StoneStepsWebalizer because wenn I have the Config-Switch DNSChildren with 0 there will be no DNS-Resolving with Webalizer (good!) but there is although no statistic for countries. Is it possible to include a config-switch to tell the Webalizer that the logfiles are pre-resolved? Regards, Besim
#2
•
Stone Steps
Under normal circumstances, DNS resolution can be disabled by commenting out DNSCache. You would still need DNSChildren for GeoIP lookups.
In your case, there are no IP addresses in the log file, so no GeoIP lookups will be done. You have to have IP addresses for GeoIP functionality to work. DNS resolution was completely rewritten in SSW, compared to the original Webalizer. SSW no longer updates log files, replacing IP addresses with domain names. That was just a bad way of doing things. > Is it possible to include a config-switch to tell the > Webalizer that the logfiles are pre-resolved? No, it's not possible. Andre
#3
•
besim
Hello Andre,
thanks for replying! I think there is a missunderstanding on the way. - I have pre-resolved Logfiles, I need no resolving and I agree with you that a statistic tool should use hier calculating time for another things than editing the logfiles :-) - I do not want to use GeoIP. You're writing in the docs that if GeoIP is not enabled the TLD of the hostnames will be used for calculating the country stats. That's a good thing but this seems not working with pre-resolved logfiles, probably only with resolving the logfiles through webalizer. This is the behaviour which makes my problem. Regards, Besim
#4
•
Stone Steps
I know what you are looking for - SSW doesn't do that. The docs describe that if GeoIP is disabled and your have IP addresses in your log file, SSW will resolve them for you and derive countries from the last domain label.
If you can build SSW from the source, you can patch up one source file to do what you are looking for. Open dns_resolv.cpp, locate the dns_resolver_t::put_dnode method and then these lines: /* skip bad hostnames */
if(!hnode || hnode->string.isempty() || hnode->string[0] == ' ')
return false;Insert this right after: if(!is_ip4_address(hnode->string)) {
string_t ccode;
ccode.hold(hnode->ccode, 0, true, hnode_t::ccode_size+1);
hnode->name = hnode->string;
dns_derive_ccode(hnode->name, ccode);
hnode->resolved = true;
hnode->scheduled = false;
return true;
}This should do it. Andre
#5
•
besim
This doesn't work for me, badly. :-( It seems that the country-stats were built through the TLD of the hostaddresse in the past. This behaviour wasn't so bad and it would be a solution for users which are having pre-resolved logfiles and do not need dns-resolving and no geoip-handling.
Is it possible to download an older version of webalizer without geoip-handling? imho this was 2.4.1.2. Besim
#6
•
Stone Steps
> This doesn't work for me, badly
Can you elaborate on what exactly doesn't work when you build with the code I mentioned above? Thanks > Is it possible to download an older version of webalizer > without geoip-handling? imho this was 2.4.1.2. SSW never really did DNS the way the original Webalizer did, so I don't think v2.4 will help you much. You might be better off using the original Webalizer then. Andre
#7
•
besim
> > This doesn't work for me, badly
> > Can you elaborate on what exactly doesn't work when > you build with the code I mentioned above? Thanks Sorry, my fault, I forgot to explain why it doesn't worked for me: I couldn't get the code compiled. I'm not a programmer. But I don't want to bother you with that. > SSW never really did DNS the way the original Webalizer > did, so I don't think v2.4 will help you much. You > might be better off using the original Webalizer then. I don't like the original implementation of the webalizer because the handling of iis-logfiles was more than crappy. Seven years of doing nothing on the code was the second point for me not to do something with the original. You are writing that SSW never really did DNS the way the original webalizer did. Again: I never used DNS resolving with SSW for my purposes, all the ip-addresses in my logfiles are already resolved and replaced with the correspondent hostnames (so far if resolvable). So I have switched off DNS resolving in SSW ("DNSChildren 0") and have get the country stats through calculating the TLD of the hostnames in the logfiles. This clever resolution, this worked in the past of SSW. Really. I have never used the original webalizer on this machine here an it worked very well. :-)
#8
•
Stone Steps
I take it you are running SSW on Windows - you don't have to be a programmer to patch up the source on Linux. Let me think about it. I'll post more later, may be next week.
Andre
#9
•
Stone Steps
I will implement this fix before the next release, which I currently plan in April. I will post additional configuration details once the code is in.
Andre
#10
•
besim
That sounds good. Drop me a mail if I you need so beta testing. And yes, you're alright, I'm using Windows.
Format Codes
|