Last active
December 15, 2017 16:26
-
-
Save PastaGringo/935b90f9a2ead5d22cc8a9ce7281b0f7 to your computer and use it in GitHub Desktop.
Get live Plex streams number from telegraf and send them to Influxdb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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