Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@PastaGringo
Last active December 15, 2017 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PastaGringo/935b90f9a2ead5d22cc8a9ce7281b0f7 to your computer and use it in GitHub Desktop.
Save PastaGringo/935b90f9a2ead5d22cc8a9ce7281b0f7 to your computer and use it in GitHub Desktop.
Get live Plex streams number from telegraf and send them to Influxdb
# More complete script from @barrycarey https://github.com/barrycarey/Plex-Data-Collector-For-InfluxDB/
# Read flattened metrics from one or more JSON HTTP endpoints
[[inputs.httpjson]]
name = "plex_stats"
servers = [
"http://YourDomain.tld:32400/status/sessions"
]
response_timeout = "5s"
method = "GET"
tag_keys = [
"MediaContainer",
]
[inputs.httpjson.parameters]
X-Plex-Token = "YourPlexToken" # <-- https://support.plex.tv/hc/en-us/articles/204059436-Finding-an-authentication-token-X-Plex-Token
[inputs.httpjson.headers]
Accept = "application/json"
# Graphana Query : SELECT "MediaContainer_size" FROM "httpjson_plex_stats" WHERE $timeFilter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment