plex_exporter

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

plex_exporter

Go Report Card Build Status

Description

Prometheus exporter for Plex Media Server. This exporter query your Plex Media Server installation directly without passing by Plex.tv.

Metrics

  • Plex Media Server information: version
  • Sessions: total active
  • Transcoding Sessions: total active
  • Libraries: number of medias

output

# HELP plex_info Plex media server information
# TYPE plex_info Gauge
plex_info{version="1.26.2.5797-5bd057d2b"} 1
# HELP plex_media_server_library_media_count Number of medias in a plex library
# TYPE plex_media_server_library_media_count gauge
plex_media_server_library_media_count{name="Animes",type="show"} 33
plex_media_server_library_media_count{name="Cartoons",type="show"} 6
plex_media_server_library_media_count{name="Movies",type="movie"} 283
plex_media_server_library_media_count{name="TV Shows",type="show"} 36
# HELP plex_sessions_active_count Number of active Plex sessions
# TYPE plex_sessions_active_count gauge
plex_sessions_active_count 2
# HELP plex_transcode_sessions_active_count Number of active Plex transcoding sessions
# TYPE plex_transcode_sessions_active_count gauge
plex_transcode_sessions_active_count 2

Configuration

{
 "exporter": {
    "port": 9594
  },
  "server": {
    "address": "plex",
    "port": 32400,
    "token": "token"
  }
}

Usage

# ./plex_exporter --config config.json
2021/10/22 08:18:11 Starting exporter on port 9594 ...

TODO

Secure transport (with TLS) while requesting metrics. Server token is actually passed through headers and can easilly be hacked if used with http. First thing is to move it to https without verification and check is in the future.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL