Skip to content

Plex Logs to Remote Syslog Server with rsyslog

Plex typically stores its log files here:
/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log

With rsyslog you can watch that file and forward lines from the log file.

apt-get update
apt-get -y install rsyslog
vi /etc/rsyslog.conf
module(load="imfile" PollingInterval="10")

# Plex Log File Monitor
input(type="imfile"
      File="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log"
      Tag="Plex Media Server:"
      Severity="info" # notice, info, warning...etc...
      Facility="local3")

Directly below that last line you can configure what and where to send the messages, here’s a few that I’m using:

if $syslogfacility-text == 'local3' and ($msg contains 'speed=0' or (($msg contains 'GET /video/') and ($msg contains 'Plex-Username'))) then @192.168.x.x
if $syslogfacility-text == 'local3' and ($msg contains 'stream will be transcoded') then @192.168.x.x

If you just want to send everything in the log file just use if $syslogfacility-text == 'local3' then @192.168.x.x

Published inTech

Comments are closed.