Skip to content

Instantly share code, notes, and snippets.

@tyzbit
Last active November 6, 2016 03:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyzbit/a5b97951b823930d86e89128b56ded0c to your computer and use it in GitHub Desktop.
Save tyzbit/a5b97951b823930d86e89128b56ded0c to your computer and use it in GitHub Desktop.
^(?<timestamp>\w+\s+\d+,\s+\d+\s+\d+:\d+:\d+\.\d+)[^\]\n]*\]\s+(?<loglevel>\w+) - (?<full_message>(?:(?:Request: \[(?<request_ip>[^:]+).*Token \((?<username>[^)]+))?(?:\[?(?<status_source>[\w\s]+)((\]|: )))?(?:Adding (?<session_number>\d) sessions\.)?(?:Found session GUID of (?<session_guid>[^\s]+))??(?:Session (?<playback_session_guid>[^\s]+) \((?<playback_session_number>[^\)]+)\) is (?<placyback_session_status>\w+))?(?:using profile (?<transcode_profile>.*))?(?:.*\/transcode\/session\/(?<transcode_session_guid>[^\/]+))?(?:It took (?<time_taken>[\d\.]+) sec to (?<action_taken>.*))?)?(?:Content-Length of (?<file_path>.*\/(?<file_name>[\w\s]+\.(avi|mp4|mkv|m4v|wmv|mpg|mpeg|divx))(\s|$)))?.*)$
@tyzbit
Copy link
Author

tyzbit commented Nov 6, 2016

sourcetype="Plex Media Server"
| transaction startswith="token-based"

https://www.regex101.com/r/6PuPxP/1
(select the latest version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment