mvantassel / plexpy2influx

Pipe select PlexPy metrics to InfluxDB so it can be graphed in Grafana
MIT License
7 stars 5 forks source link

Grafana examples #13

Closed ninthwalker closed 6 years ago

ninthwalker commented 6 years ago

Hi, thanks for compiling this into a docker. I get a successful connection and data written to my InflixDB. My library counts are all correct, however when trying to write the query in Grafana for transcodes/live streams, it seems like the counts are not accurate. Maybe I am doing the query's wrong but I've tried some multiple way's and haven't gotten it. Do you have some examples I could see? Thanks.

mvantassel commented 6 years ago

Hey @ninthwalker,

Thanks for checking out the project. The sessions data should be straight forward to graph but if you're looking at the session data you probably ran into the same issue I did and it took a bit of digging for me to figure out. Have a look at this query:

SELECT count(distinct("session")) FROM "session" WHERE $timeFilter GROUP BY time(60s), "resolution", "transcode_decision", "type" fill(0)

Note the count AND distinct. If you don't do both in the query edit mode you'll see inflated numbers. I couldn't get that to work using the simple editor.

Let me know if you need any more help!