Kaltura Analytics: Geographic Distribution does not show the real regions

I have a problem with my self hosted Kaltura 11.7 installation. The analytics seems works fine except the Geographic Distribution that shows only one region named “ZZ”.


Looking in forum, I have not found any topic about this specific analytic’s issue. Has anyone had the same problem?

Anyone with same issue or knows how to check region config in analytics?

Yes i just discover the same issue
I try to investigate more, i have a lot of plays comes from “BURUNDI” which not true
in database kalturadw
i found table called “dwh_dim_ip_ranges” when i select country_name "“BURUNDI” it shows
IP range 3288467456 to 3288469503 and from 3302949632 to 3302949887 belongs to country_id =26, then i check table called "dwh_fact_plays"
here is a sample of what I found
user_ip : 197.16.223.226, user_ip_number : 3306217442, country_id = 26
user_ip: 197.167.2.46, user_ip_number: 3316056622, country_id = 26
as you can see the user_ip even not in the range of country “BURUNDI” (country_id =26)
i try to use ip to decimal calculator
https://www.ultratools.com/tools/decimalCalcResult?ipAddress=197.16.223.226
it seems the convert is correct from IP to decimal
ipAddress=197.16.223.226 ,
Converted Decimal IP:
3306217442
ipAddress= 197.167.2.46
Converted Decimal IP:
3316056622

i think dwh_dim_ip_ranges is not updated, i will update it and feed you back

I think the function responsible for getting the country IP is
kalturadw_ds.get_ip_country_location if you try to call this function and pass it your user_ip_number (3306217442) it will return in my case 26,26 as there are no range for the above user_ip_number so it takes last range near to your user_ip_number,
I’m updating my database and i will feed you back

Sorry for ZZ it’s the private range e.g. 10.0.0.0/8 192.168.0.0/16 …etc, that happen if you try to browse kaltura from LAN

after update the kalturadw -> dwh_dim_ip_ranges it seems statistics is going correct, her is the update version
http://www.4shared.com/folder/S6X1YbB5/dwh_dim_ip_ranges.html
copy old dwh_dim_ip_ranges and import new rar dwh_dim_ip_ranges (its csv)

If the server is behind a load balancer / ssl offloader ZZ wil be the only region reported regardless of client IP.

It would be great if the analytics gathering function could look for “X-Real-IP” instead. That would give you the right IP instead of the LB ones.