plexSentry (20160511 Update)
[20160511 Update - Incremental]
-Added a key to the config file to account for secure only connections (a work around till i figure out a bug in auto detection)
-Various little fixes I've built in over the past couple of months as I work on the big overhaul.
<add key="b_secureOnly" value="false" /><!-- ssl only connections -->
[20151216 Update - Incremental]
-SQL Server Update - Added the ability to monitor shared channels, and added logic to make sure it doesn't kill optimizing jobs (this fixed a issue with sync jobs as well) Only need to update the executable and the common js file.
[20151216 Update - Incremental]
-SQL Server Update Log - file added and some small tweaks
[20150907 Update - Incremental]
-SQL Server Update (only PlexSentry.exe was changed) - Because of changes to the PMS or the new app, iOS users (maybe other clients, but haven't seen it yet) could get around limitations by changing their bitrate after start. The status api point /status/sessions would then not update with the new transcode key, preventing a kill. Add a new function that queries the /transcode/sessions api point for orphan transcodes by eliminating known keys from the sync and status api points, and then kills any "orphaned" key that is transcoding video. The side effect is if there is a user that has transcoding privileges that makes a switch, they'll have to restart the video with the desired bitrate to avoid orphaned transcode keys. I have two a##hole users to thank for the requirement of this new code.
plexSentry (Formerly PlexMonitor) monitors and logs all user activity (playing, syncing) on your Plex server. What separates it from other programs is the ability to set limits on your users activity. Whether it's preventing users from transcoding on your server, stopping your idiot relations from syncing your entire library, or spotting which users are sharing their logon with the entire ####ing neighborhood.
-keeps log of sessions (1 per session key, not play state) and syncs.
-If user doesn't have transcode permissions, it kills the transcode session and sends a email to user and admin
-If user stream count is above user stream max sends a email to user and admin
-If user sync count is above user sync max sends a email to user and admin after deleting sync
-When above conditions are met, attempts to kill connected clients through HTTP API (only useful on local clients)
-Connects to SQL Server back end or SQLite db file
-Monitors shared channels
-Updates user list from plex.tv as it runs
-Per user settings for transcode (h264 and others), stream count, sync limits for video\audio counts and minimum quality
-Pulls current data from specified server
-Notifies through dummy gmail account (easily changed)
-Notifications on start and stop
-Does not have to be run on target server
-Continues to operate when plex.tv is down
-Can kill transcodes and syncs directly from the web interface without conditions being met
-add email option to front end
-total sum line in summary, charts
-Add limits for amount of time they can use the server in 24 hours before notice is sent (will work on if requested)
-more notification methods?
-IIS Server (UI Only) - Someone could write a php or other middleman to handle db requests, eliminating this requirement
-SQL Server or SQLite
-VS 2012 x64 redistribution file (required for sqlite db)
-Fill in the variables in *.config file
-Use the command list in 'SQL Server - Build Commands.txt' to build your database
-Run from any computer with network access
-fill in the external server variable in script.Plex-common.js
-modify db connection strings
Email Examples -:
Subject -: Multiple Streams Detected
2 simultaneous streams (Ally McBeal-One Hundred Tears(2002)\CSI: Crime Scene Investigation-Girls Gone Wilder(2014)) were detected (Your current limit is 1). Termination of this stream has been attempted. If this is an issue with your app and the problem persists, please contact #### for possible solutions. -Media Server (this email address is for outgoing automated messages only)
Subject -: [Ally McBeal-One Hundred Tears(2002)] Transcoding was Terminated
One Hundred Tears was terminated due to transcoding, please raise your bitrate to the maximum or you will be banned. If the bitrate is at maximum, please contact #%@ for secondary codec permissions. -Media Server (this email address is for outgoing automated messages only)
- Hardware (Main Server) FIOS 150/150 (static ip's), ASUS Something, 32GB RAM, I7-4970K, ~+100TB Dedicated Media Storage down to ~+50TB because of mirroring under Stablebit Drivepool
- OS Windows 2012r2 Hyper-V/DFS Server running 5 Full time VM's
Windows 2012 (4) VM's VPN Server (vpn and directaccess tunneling) 1200MB/2 VCPU - domain controller (secondary, also DFS server) 768MB/1 VCPU - Mail (exchange) 4500MB /2 VCPU - Edge Server (Plex, PlexSentry limits Plex to prevent transcoding, excess syncing, and lmit concurrent streams by selected (ie all those I'm not having **** with) users, SQL Server 2014, IIS, Sonarr, uTorrent, CouchPotato, HeadPhones, Subsonic, Windows Update Server) 7000MB/6 VCPU
Client Type Served The full spectrum with the exception of Playstation
Media Music Tracks (+26K), Movies (+4.6K), TV Episodes (+22K)