barrycarey / Plex-Data-Collector-For-InfluxDB

Collects data about your Plex server and sends it to InfluxDB
165 stars 41 forks source link

>95 CPU% #27

Open prankousky opened 5 years ago

prankousky commented 5 years ago

Hi,

I just instlled Plex-Data-Collector-For-InfluxDB, installed the dependencies, and ran it.

Output

$ python3 plexcollector.py
Loading config: config.ini
INFO: Found 0 Bad Server(s).  Removing Them From List
Configuration Successfully Loaded
2018-11-16 13:07:45,982ERROR:PlexInfluxdbCollector:write_influx_data:380: Database {} Does Not Exist.  Attempting To Create

It has been running like this for about 15 minutes. No further terminal output. htop shows CPU% between 90 - 100. It sometimes drops to 25%, then spikes right back up.

Is this just the initial creating of database and tables, or might something be wrong? I have data in influxdb and can display it in Grafana with your provided sample json.

However, it displays this

Plex Streams 1 TV Shows N/A Episodes N/A Movies N/A Seasons N/A

One Plex Stream is correct, however, I have shows and movies, which are apparently not being displayed. The Active Plex Streams keeps switching between the actual song I am streaming via Plex App on my computer and no data to show. This is really weird, because apparently the currently played file is being aknowledged and processed, otherwise Grafana would not be able to read the value from influx. But then it is gone, appears again, disappears again...

I would just like to know if I should give it another 15 minutes (or even an hour) and then be good, or if there is something completely wrong and if I should stop it instead.

Thanks in advance for your help.

RobinDadswell commented 5 years ago

Hi prankousy, what is the delay in your config file? I found that I had to edit the query slightly on the plex stream table, the where clause on mine is "WHERE time > (now() - 12s)" I have the dashboard set to a 30s refresh rate and the delay set on the polling run is 10 seconds, this means that I don't get duplicates etc inside the grafana dashboard.

Also check the queries on all of the panels as I believe they are set to look at a specific host and specific library names (you should be able to change the library names through the drop down)

Cheers

Robin

sojab0on commented 2 years ago

In the edit pane of the tv shows and movies please set the correct pibrary names in the query otherwise it will not show your tv shows and movie counts