Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worldmap panel #15

Closed
icehuntman opened this issue Aug 9, 2018 · 12 comments
Closed

Worldmap panel #15

icehuntman opened this issue Aug 9, 2018 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@icehuntman
Copy link

I live in the Netherlands. All streams therefore also come from the Netherlands.
Unfortunately worldmap panel indicates that the streams come from "Utah".
The location in "users online" does indicate the correct location.
does the panel only work with location from the United States?

@samwiseg0
Copy link
Member

samwiseg0 commented Aug 9, 2018

You may need to play with the world map settings to get the right display. It uses the region code provided by the GeoIP2 DB.

Can you tell me which region_code is being inserted into the influxdb?

We are using the .subdivisions method for determining location on the map.
https://geoip2.readthedocs.io/en/latest/index.html?highlight=subdivisions#geoip2.records.Subdivisions

2018-08-09_15-49-16

@samwiseg0 samwiseg0 added the question Further information is requested label Aug 9, 2018
@samwiseg0 samwiseg0 self-assigned this Aug 9, 2018
@icehuntman
Copy link
Author

Region_code "UT" is being inserted.

@samwiseg0 samwiseg0 added enhancement New feature or request and removed question Further information is requested labels Aug 9, 2018
@samwiseg0
Copy link
Member

I did a test with a generic IP in the Netherlands and it does seem to only work in the US. I will put some thought into how to expand this to the rest of the world. We will have to change the method in which we use to determine location to accomplish this.

@samwiseg0
Copy link
Member

samwiseg0 commented Aug 9, 2018

I think I figured out a good way to expand this without breaking current functionality.

Can you try this updated tautulli.py?

You will need to install a new module pip3 install Geohash

Can you report back to let me know if these settings worked for you?

Also change grafana to these settings...
2018-08-09_18-04-28
2018-08-09_18-04-42

@icehuntman
Copy link
Author

icehuntman commented Aug 9, 2018

Yes! With this config it works like a charm!

Had to install "pip install python-geohash"..
was getting this error:

"Traceback (most recent call last):
File "tautulli.py", line 8, in
import Geohash
File "/usr/local/lib/python3.6/dist-packages/Geohash/init.py", line 21, in
from geohash import decode_exactly, decode, encode
ModuleNotFoundError: No module named 'geohash'"

@samwiseg0
Copy link
Member

Great. I will add that to the requirements.txt file. I did notice that the number of clients in the circles seems a bit off. I will do some more tinkering before I push it. Thanks for the speedy testing.

@samwiseg0
Copy link
Member

I thought about it some more and I think I am going to do it a little bit differently. I am going to use the Lat and Long instead of the geohash. That will remove the dependency.

I have updated the gist to reflect the changes.

grafana changes
2018-08-09_20-51-02
2018-08-09_20-51-03

@xunil75
Copy link

xunil75 commented Nov 6, 2018

Hi guys, sorry for jumping into this issue but I do have the same problem where I can't see anything on the map. I'm based in Switzerland. The linked "Gists" are not available anymore as well.

Thanks

@samwiseg0
Copy link
Member

samwiseg0 commented Nov 6, 2018

@xunil75
Copy link

xunil75 commented Nov 7, 2018

@samwiseg00 then I must have a problem with the retrieved data from Taututtli since I'm not getting the Field "location". Can you please explain me how to include the panel_row_worldmap.json?

This is how my Dashboard looks like:

screencapture

@samwiseg0
Copy link
Member

Edit the panel json and paste in the json from the repo.

unknown

@xunil75
Copy link

xunil75 commented Nov 7, 2018

@samwiseg00 you're the man!!

image

Thank you!

@Boerderij Boerderij locked and limited conversation to collaborators Mar 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants