57
Maxmind GeoIP Plugin Notes
Maxmind is a company that sells geolocation technology that matches IP addresses to countries, regions, cities and ISPs. All
of their databses are available for an initial fee and a monthly update subscription and include greater accuracy and a higher
frequency of updating. Some databases are available for free but they are not updated as often and may not be as accurate.
Install:
First choose a database. When downloading a database for AWStats, please download the Binary Format version. Current
databases AWStats supports are:
Commercial: Country, Region, City, Organization, ISP
Open Source Country, City, ASN
If you choose to purchase a commercial database for country information, you only need to purchase the one with the
greatest level of detail you want to appear in your report. For example, if you only want country information, you can
purchase just the Country database. If you want City detail, you do not need to purcahse the Country and Region databases,
just the City database. (Organization and ISP databases do not include country or region info so you must purchase those in
addition to Country, Region or City if you desire more information)
Next, install the Geo::IP Perl module. Then choose a Maxmind API to access the databse. Maxmind also has two Perl API's
available for interacting with their databases. There is a a C/Perl library that will run quickly and there is a pure Perl API that
is a little slower but does not require any C depdencies. Choose one of the APIs and install it on your machine.
Parameters: Each GeoIP database can be loaded entirely into memory or lookups can scan through the file. When editing
your AWStats configuration, you have to specify if you want to use memory or file lookups. Specify GEOIP_STANDARD for
file lookups or GEOIP_MEMORY_CACHE for memory loading. Please note that the memory method may crash on some
Linux distributions so if that happens, try the standard method. Also, using the C API with Activestate Perl may crash on
Windows machines, so use the PurePerl module instead.
You may also override some databases by generating a comma seperated text file with IP addresses and associated data.
This is useful if you are reporting on an Intranet site, have a mixture of internal and external users or the data for a specific IP
is incorrect in the database. You can use the included geoip_generator tool to create override files. (Overrides only available
in AWStats version 6.96 and later)
Override Formats:
GeoIP - ip_address,"countrycode"
GeoIP City - ip_address,"countrycode","regioncode","cityname","postalcode",latitude,longitude,"metrocode","areacode"
GeoIP ASN - ip_address,"asn ispname"
GeoIP Region - ip_address,"countrycode","regioncode"
GeoIP Org - ip_address,"organisation"
GeoIP ISP - ip_address,"ISP"
Note: AWStats does not currently support IPv6 for GeoIP lookups as Maxmind only offers the country DB with IPv6 at this
time. As Maxmind includes IPv6 support in more DBs, we will update AWStats.
Enabling GeoIP plugins will reduce the speed of AWStats processing.
GeoIP
Required Modules: Geo::IP or Geo::IP::PurePerl (from Maxmind)
Parameters: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/geoip.dat] </pathto/override.txt>
Description: Country chart is built from an Internet IP-Country database.
Note: You must choose between using this plugin or the GeoIPfree plugin (need Perl Geo::IPfree module, database is free
but not up to date).
Example LoadPlugin="geoip GEOIP_STANDARD /usr/local/geoip.dat /usr/local/geoip_override.txt"
Plugin provided with AWStats (5.2+)
GeoIP_City_Maxmind
Required Modules: Geo::IP or Geo::IP::PurePerl (from Maxmind)
Parameters: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPCity.dat] </pathto/override.txt>
Description: This plugin adds a chart of hits by cities (with country and regions informations for major countries).
By enabling this plugin, you will see a new link called 'Cities' on reports menu.
Example LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/local/geoip.dat /usr/local/GeoIPCity_override.txt"
Plugin provided with AWStats (6.2+)
GeoIP_ASN_Maxmind
Required Modules: Geo::IP or Geo::IP::PurePerl (from Maxmind)
Parameters: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPASN.dat] </pathto/override.txt> <link to AS
Plugins, contribs and related programs
98/103
14/07/2015