GithubHelp home page GithubHelp logo

Comments (9)

samwiseg0 avatar samwiseg0 commented on May 12, 2024

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.

from varken.

n1nj4888 avatar n1nj4888 commented on May 12, 2024

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!

from varken.

samwiseg0 avatar samwiseg0 commented on May 12, 2024

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.

from varken.

n1nj4888 avatar n1nj4888 commented on May 12, 2024

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)...

from varken.

samwiseg0 avatar samwiseg0 commented on May 12, 2024

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 ;)

from varken.

n1nj4888 avatar n1nj4888 commented on May 12, 2024

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)?

from varken.

samwiseg0 avatar samwiseg0 commented on May 12, 2024

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.

from varken.

samwiseg0 avatar samwiseg0 commented on May 12, 2024

@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

from varken.

n1nj4888 avatar n1nj4888 commented on May 12, 2024

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

from varken.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.