{"id":13582195,"url":"https://github.com/arnarg/plex_exporter","last_synced_at":"2025-04-06T14:30:37.639Z","repository":{"id":43433578,"uuid":"189770163","full_name":"arnarg/plex_exporter","owner":"arnarg","description":"A Prometheus exporter for a few metrics from Plex Media Server","archived":false,"fork":false,"pushed_at":"2023-02-24T17:53:25.000Z","size":5243,"stargazers_count":74,"open_issues_count":6,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-02T15:48:11.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arnarg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-06-01T19:25:55.000Z","updated_at":"2024-06-21T13:59:14.000Z","dependencies_parsed_at":"2024-01-07T09:46:17.167Z","dependency_job_id":null,"html_url":"https://github.com/arnarg/plex_exporter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnarg%2Fplex_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnarg%2Fplex_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnarg%2Fplex_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnarg%2Fplex_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnarg","download_url":"https://codeload.github.com/arnarg/plex_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223253768,"owners_count":17114253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:02:29.115Z","updated_at":"2024-11-05T22:30:36.120Z","avatar_url":"https://github.com/arnarg.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"Plex exporter\n-------------\n\n```\nNAME:\n   plex_exporter - A Prometheus exporter that exports metrics on Plex Media Server.\n\nUSAGE:\n   plex_exporter [global options] command [command options] [arguments...]\n\nCOMMANDS:\n   token, t  Get authentication token from plex.tv\n   help, h   Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --config-path value, -c value     Path to config file (default: \"/etc/plex_exporter/config.yaml\")\n   --listen-address value, -l value  Port for server (default: \":9594\")\n   --log-level value                 Verbosity level of logs (default: \"info\")\n   --format value, -f value          Output format of logs (default: \"text\")\n   --auto-discover, -a               Auto discover Plex servers from plex.tv\n   --plex-server value, -p value     Address of Plex Media Server\n   --token value, -t value           Authentication token for Plex Media Server\n   --help, -h                        show help\n   --version, -v                     print the version\n```\n\n## Metrics\n\n```\n# HELP plex_library_section_size_count Number of items in a library section\n# TYPE plex_library_section_size_count gauge\nplex_library_section_size_count{name=\"Movies\",server_id=\"asdf1234\",server_name=\"myplexserver\",type=\"movie\"} 598\nplex_library_section_size_count{name=\"TV Shows\",server_id=\"asdf1234\",server_name=\"myplexserver\",type=\"show\"} 31\n# HELP plex_server_info Information about Plex server\n# TYPE plex_server_info counter\nplex_server_info{platform=\"Linux\",server_id=\"asdf1234\",server_name=\"myplexserver\",version=\"1.16.6.1592-b9d49bdb7\"} 1\n# HELP plex_sessions_active_count Number of active Plex sessions\n# TYPE plex_sessions_active_count gauge\nplex_sessions_active_count{server_id=\"asdf1234\",server_name=\"myplexserver\"} 1\n```\n\n## Running\n\nBefore application can be run an authentication token is needed from plex.tv. This can be acquired by running `plex_exporter token`.\n\nPlex exporter can then be run with `plex_exporter -t \u003cauth_token\u003e --auto-discover` and Plex servers will be auto discovered from plex.tv (this will only include servers you own).\n\n### Without auto discovery\n\nIf you don't want to auto discover from plex.tv you can provide a base url to the server with `--plex-server`.\n\n### Config file\n\n`--plex-server` flag only supports specifying a single Plex server. If you want to provide more you need to use the config file.\n\n```yaml\naddress: \":9594\"\nlogLevel: \"info\"\nlogFormat: \"text\"\nautoDiscover: false\ntoken: \"asdf1234\"\nservers:\n- baseUrl: https://my.plexserver.io:32400\n  insecure: true\n# My friend trusts me a lot\n- baseUrl: https://myfriends.plexserver.io:32400\n  token: my-friends-token\n```\n\nServers without a token use the token from top-level config.\n\nThe insecure key turns off tls verify for that server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnarg%2Fplex_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnarg%2Fplex_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnarg%2Fplex_exporter/lists"}