Tautulli - Monitor your Plex Media Server

I noticed today that no stats have been recorded for almost 4 weeks. In the logs I found the following:

2018-10-02 15:44:25 ERROR Tautulli WebSocket :: Failed to process session data: database disk image is malformed.
2018-10-02 15:44:25 ERROR Tautulli Database :: Fatal Error executing SELECT * FROM sessions WHERE session_key = ? :: database disk image is malformed
2018-10-02 15:44:24 ERROR WebUI :: /user?user_id=20068811#tab_tabs-history : Uncaught TypeError: Illegal invocation. (jquery-2.1.4.min.js:4)
2018-10-02 15:44:24 WARNING Tautulli DataFactory :: Unable to execute database query for get_history: database disk image is malformed.
2018-10-02 15:44:24 ERROR Tautulli Database :: Fatal Error executing SELECT * FROM (SELECT session_history.reference_id, session_history.id, MAX(started) AS date, MIN(started) AS started, MAX(stopped) AS stopped, SUM(CASE WHEN stopped > 0 THEN (stopped - started) ELSE 0 END) - SUM(CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) AS duration, SUM(CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) AS paused_counter, session_history.user_id, session_history.user, (CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = “” THEN users.username ELSE users.friendly_name END) AS friendly_name, platform, player, ip_address, session_history.media_type, session_history_metadata.rating_key, session_history_metadata.parent_rating_key, session_history_metadata.grandparent_rating_key, session_history_metadata.full_title, session_history_metadata.title, session_history_metadata.parent_title, session_history_metadata.grandparent_title, session_history_metadata.original_title, session_history_metadata.year, session_history_metadata.media_index, session_history_metadata.parent_media_index, session_history_metadata.thumb, session_history_metadata.parent_thumb, session_history_metadata.grandparent_thumb, MAX((CASE WHEN (view_offset IS NULL OR view_offset = “”) THEN 0.1 ELSE view_offset * 1.0 END) / (CASE WHEN (session_history_metadata.duration IS NULL OR session_history_metadata.duration = “”) THEN 1.0 ELSE session_history_metadata.duration * 1.0 END) * 100) AS percent_complete, session_history_media_info.transcode_decision, COUNT(*) AS group_count, GROUP_CONCAT(session_history.id) AS group_ids, NULL AS state, NULL AS session_key FROM session_history LEFT OUTER JOIN users ON session_history.user_id = users.user_id JOIN session_history_metadata ON session_history.id = session_history_metadata.id JOIN session_history_media_info ON session_history.id = session_history_media_info.id WHERE session_history.user_id = ? GROUP BY session_history.reference_id UNION SELECT NULL AS reference_id, NULL AS id, started AS date, started, stopped, SUM(CASE WHEN stopped > 0 THEN (stopped - started) ELSE (strftime("%s", “now”) - started) END) - SUM(CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) AS duration, SUM(CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) AS paused_counter, user_id, user, (CASE WHEN friendly_name IS NULL OR TRIM(friendly_name) = “” THEN user ELSE friendly_name END) AS friendly_name, platform, player, ip_address, media_type, rating_key, parent_rating_key, grandparent_rating_key, full_title, title, parent_title, grandparent_title, original_title, year, media_index, parent_media_index, thumb, parent_thumb, grandparent_thumb, MAX((CASE WHEN (view_offset IS NULL OR view_offset = “”) THEN 0.1 ELSE view_offset * 1.0 END) / (CASE WHEN (duration IS NULL OR duration = “”) THEN 1.0 ELSE duration * 1.0 END) * 100) AS percent_complete, transcode_decision, NULL AS group_count, NULL AS group_ids, state, session_key FROM sessions WHERE user_id = ? GROUP BY session_key) ORDER BY date COLLATE NOCASE DESC :: database disk image is malformed

What can I do to make it work again?

Anyone know why my Tautulli does not update via the GUI? I always have to update manually via git. Followed the reset command on the FAQ page and that hasn’t helped.

Read the FAQ

Look for git error in Tautulli logs then check if FAQ addresses it.
Could be permissions. Could be not in search path.

–jbop allStreams --userId {user_id} --notify 1 --killMessage You are not allowed to view this content.

As you can see, it has nothing to do with the kill message I think this is coming from the notify 1 parameter but I cannot locate it when I view that notification agent.

You do not have the username argument specified that is why you are not seeing a username. With this script the notifier only sends what the script provides.

It should be: --jbop allStreams --userId {user_id} --username {username} --notify 1 --killMessage "You are not allowed to view this content."

Thank you o wise one. Did not make the connection with needing the username. Working fine now!

After all was said and done, that whole JBOPS related discussion should have likely been asked in the JBOPS forum thread.
I use several scripts, and recommend conversations start there for them - once errors occur that are beyond @blacktwin 's help, they send us over here.
(and for anyone who has no idea what JBOPS is - please see Blacktwin’s excellent collection of python scripts, most/many of which are intended for Tautulli - JBOPS - Just a Bunch Of Plex Scripts )

1 Like

@SwiftPanda16
Is there a guide how to customize the newsletter?

I would have liked all the categories I have made to be divided but although we have already looked in groups of three nobody can do this.

For example, I have subdivided anime movies, documentaries and foreign languages and would like to have them displayed with headings for each category. At the moment everything that 1. doesn’t look very nice and 2. isn’t clearly recognizable for the users is being pulled together.

It would be great to have a tutorial on how to customize this to make it work.

1 Like

@SwiftPanda16
I know people often ask a lot of things of you, but I just wanted to say nice job! I don’t code (or haven’t learn how to yet) but i just wanted to say thank you for your hard work and your patience (even if it wasn’t easy keeping it cool sometimes) I’ve read all 872 posts, and I’ve learned a lot through you and it gave me the desire to learn more even though I don’t know where to start (but that’s ok i love learning) So a big Thank you for all your time you put into helping others. Keep up the good work!

1 Like

@SwiftPanda16

hope you can help me out here.

i want to get img working @discord
Tautulli > Settings > Notfication Agents > Discord > Include Rich Metadata Info >
i have this option ticked!

When my discord bot add the new content this img looks like this.

i use these settings to get that ( i have it set to disabled)

Then if i use these settings (imgur client id removed from the img )

I get this

2

Is it not possible to get the correct img to show up next for the movie / tv-show that was uploaded?

Not a Tautulli issue.

@SwiftPanda16

So what do i do to fix the img on discord?

There is a bug with discord and imgur. You can use self-hosted or cloudinary to work around the discord bug.

1 Like

Or wait on Discord to fix the bug

i tried both self-host & cloudinary they give the same result :confused:
appreciate the info

guess i have to =(

Instead of having to install a separate app, I wonder if there is any hope for native plex statistics down the road.

Off-topic question honestly.
You’ve been here as a registered forum member two years. (Happy Anniversary btw)
Lurker like many probably more than that.
Long enough to know better. Don’t hold your breath.

I just recently saw a forum topic requesting stats, like tautulli does, carried over from 2 forum versions ago (~4 years old) ‘closed’ because it didn’t follow strict request guidelines and the mod stated to see the new rules. Problem is, the original poster hadn’t posted in 2+ years.
I had a slight hope when the dev of original PlexPy got hired long ago, before Jonny took it over, that perhaps it would get swallowed into codebase.

With Plex getting rid of python, I don’t see it happening, ever.
Plex seems to want media viewers, not technology savvy server admins.
They can’t control what server admins feed the general populace if we’re tracking them from our own servers.

5 Likes

I was viewing stats of current friends stream and the app says he is transcoding so I loaded web login to view more details and it’s saying hes direct playing? Why would this say two different things, and which one to believe?

https://imgbox.com/dYVl2VBm