This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Using Geolocation Based Statistics
Follow the procedure below in order to configure WSO2 IS Analytics Server to show the regions of the users authenticated though WSO2 Identity Server.
- Download the Geolocation data from here.
- Unzip the file you downloaded.
Create the database by executing one of the scripts in the
Geolocation Data/dbscripts
directory. In this example,mysql.sql
is executed.This can be done using the MySQL Workbench.
For detailed instructions to run the database script, see MySQL Documentation - The Workbench Scripting Shell.
Restore data to the BLOCKS and LOCATION tables by importing data from the following files.
Geolocation Data/data/BLOCKS.csv
Geolocation Data/data/LOCATION.csv
For more information, see MySQL Documentation - Data Export and Import.
- Download a JDBC provider depending on the database you are using (MySQL in this example), and copy it to
<IS_ANALYTICS_HOME>/repository/components/lib
directory. Configure datasource in the
<IS_ANALYTICS_HOME>/repository/conf/datasources/geolocation-datasources.xml
file as follows.<datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration"> <datasources> <datasource> <name>GEO_LOCATION_DATA</name> <description>The datasource used for Geo location database</description> <jndiConfig> <name>jdbc/GEO_LOCATION_DATA</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:mysql://localhost:3306/GEO_LOCATION_DATA</url> <username>wso2carbon</username> <password>wso2carbon</password> <driverClassName>com.mysql.jdbc.Driver</driverClassName> <maxActive>50</maxActive> <maxWait>60000</maxWait> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval> <defaultAutoCommit>false</defaultAutoCommit> </configuration> </definition> </datasource> </datasources> </datasources-configuration>
- Restart WSO2 IS Analytics server.