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

Tautulli - multiple server support? #25

Closed
n1nj4888 opened this issue Nov 19, 2018 · 9 comments
Closed

Tautulli - multiple server support? #25

n1nj4888 opened this issue Nov 19, 2018 · 9 comments
Labels
enhancement New feature or request request This is a request wont-fix This will not be worked on

Comments

@n1nj4888
Copy link

Can the Tautulli script be modified to support multiple tautulli servers (radarr/sonarr scripts already seem to support multiple servers)?

This is especially useful for those with more than one Plex server since I understand Tautulli currently is only able to monitor a single Plex server, therefore 2 Tautulli instances are required to monitor 2 Plex servers?

@samwiseg0 samwiseg0 added enhancement New feature or request question Further information is requested labels Nov 19, 2018
@samwiseg0
Copy link
Member

samwiseg0 commented Nov 19, 2018

This is not a simple task. Since we use the session_key as the unique ID there can be cases where the same key could be present in both servers.

Have you tried running multiple instances of the tautulli.py script? Theoretically that should work but you may run into the same session key being present in both servers.

@n1nj4888
Copy link
Author

By session_key, are you referring to session_id (or session_id1) that is stored in the influxDB Tautulli mearement? This appears to be a 24 character alpha-numeric ID which is unlikely to be the same across servers but, if it is, could possibly a unique key be stored in addition to the current session_id / session_id1 keys which is something like <SERVER_URL>:<SERVER_PORT>_<SESSION_ID>?

Thanks!

@samwiseg0
Copy link
Member

There are 2 types session key and session ID. If you look at the table in grafana we use session key which enumerates by 1 every time a new session is started. We also write the session ID but we do not currently use it. You can try 2 instances of the script and change the table if you would like. There are other considerations such as number of sessions that would require a bit of work and re writes to get working properly.

@samwiseg0 samwiseg0 added request This is a request and removed question Further information is requested labels Nov 22, 2018
@n1nj4888
Copy link
Author

n1nj4888 commented Nov 22, 2018

Thanks @samwiseg00, understood...

I could try running a separate docker for Server #2 to write to either the same DB/measurement (with the possibility that this may break the Session Key) or possibly get the docker for Server #2 to write to a separate DB but this would be better if it could write to the same DB/measurement as Server #1 so that the Grafana Dashboard could report on both servers...

Is the Session Key truly unique to the DB/measurement table (like a primary key) or could we simply modify the script to also write the Server URL:Port as a new column and distinguish them in the dashboard?

I understand this may require some work, so leaving it here as a suggestion for the future if you agree it would be beneficial to support multiple tautulli servers (similar to how it supports multiple sonarr/radarr servers currently)...

@samwiseg0
Copy link
Member

samwiseg0 commented Nov 22, 2018

We will consider it. But it will not happen any time in the near future.

Note you will have to use a single database of you want to use the same table, as grafana will not pull from 2 sources in one panel. You can duplicate the current panel and point it to the other database if you would like to go that route.

If we do it we would make it a unified view and import into the same database. That is why it is much more complicated then you might think ;)

@n1nj4888
Copy link
Author

Thanks for considering. I agree it would be the best solution to create a unified view for multiple servers on a single database / measurement.

Perhaps a consideration for a short-term feature would be to make the measurement names configurable in configuration.py for the scripts. This way, I could setup docker #1 to write to DB1 -> Tautulli (default) and Docker #2 to write to DB1 -> Tautulli2? This way I could then graph both on the same panel (albeit from two measurements)?

@samwiseg0
Copy link
Member

samwiseg0 commented Nov 22, 2018

The short term solution is what I described. 2 instances pushing to different databases and you can duplicate the panels to show the other servers. The other option again, already described, would be to push 2 scripts to the same database with the risk of duplicate, missing, or overwritten data.

If any development is done it will be a complete solution and not something half baked.

Edit: Feel free to edit the scripts to your needs and preference. PR’s are also welcomed.

@samwiseg0 samwiseg0 added the wont-fix This will not be worked on label Nov 26, 2018
@samwiseg0
Copy link
Member

samwiseg0 commented Nov 26, 2018

@n1nj4888 After some thought and discussion with the group. We will not be pursuing development of this feature. As described there are many complications with keeping everything in one script and the work can be acomplished on the Grafana side.

I did however do some testing and realized that it is pretty easy to get things into a unified view. I had forgotten that Grafana has a --mixed-- option to mix the different data sources.

The best/scaleable way that I tested is to have a script instance per Tautulli server and posting each server into a separate database.

Example:
Table

@n1nj4888
Copy link
Author

Ok thanks for looking into this and the tip around the Grafana mixed sources.

@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 request This is a request wont-fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants