Closed (won't fix)
Project:
Drupal core
Version:
5.x-dev
Component:
statistics.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 May 2006 at 18:24 UTC
Updated:
21 Jan 2010 at 19:30 UTC
Currently, hit details only gives you an IP address. I believe that this is necessary, but not all that useful. An RDNS lookup can provide real hostname/domain information, if it exists. This makes it much easier to determine the source organization without having to do a manual lookup.
The lookup is performed on the IP address only when the user clicks on "details" in the recent hits section. Therefore, it doesn't encumber the statistics gathering process. (Adding this lookup to the DB on access would be a bad idea.)
This issue was discussed here (for watchdog), but seems to have died:
http://drupal.org/node/22494
| Comment | File | Size | Author |
|---|---|---|---|
| statistics-module-rdns-lookup.patch.txt | 1.47 KB | colan |
Comments
Comment #1
killes@www.drop.org commentednew features go into cvs.
Comment #2
dries commentedCoding style needs work. We don't use camel-case variable names.
Also, can't this be accomplished by a php configuration change?
Lastly, this would be useful for the watchdog module as well.
Comment #3
peterx commentedPossible alternative:
I looked at adding host name to Top Visitors using gethostbyaddr(). As an enhancement, I though of loading the result into a table containing:
create table {access_log_host_name}(
`address` varchar(128) not null default '',
`name` varchar(255) not null default '',
`updated` date not null default '0000-00-00'
) comment='Address to name translation for accesslog.';
1/ Set a config variable to control the lookup.
2/ Run the list. If the variable is set, join to the name table and group by name.
3/ If an address does not match, do a lookup for next time. The administrator can always refresh the list.
Many of my customers have clusters of servers each with a different IP address but all with the same name. The entries would be summarized to one name instead of several IP addresses.
The table contains a date of creation so old entries can be refreshed by a cron hook.
The table could be used by other modules and the lookup functions made generic. If names are accessed purely by generic lookup after reading the underlying data then the overall performance would be slower than using a join and you would not be able to summarize to the name.
petermoulding.com/web_architect
Comment #4
peterx commentedI created a generic lookup and added it to the Top Visitors list as a test. The function is:
The usage in the top visitors function is:
I did not create the join because I wanted to test the lookup function first.
Gethostbyaddr works only with addresses on the American registry. None of the domain names show up for Australia or Asia. There are far more complicated ways to find names that do not show up from gethostbyaddr but many of those are operating system specific which makes them useless. (I noticed today that one of my hosted Linux based sites is now on a FreeBSD server.)
Does this table based approach interest you enough to continue development? Should I continue with it here or split it into a separate request?
petermoulding.com/web_architect
Comment #5
dave reidThis belongs in contrib, not core.