{"id":16828536,"url":"https://github.com/russorat/telegraf-webhooks-plex","last_synced_at":"2025-06-11T15:33:16.610Z","repository":{"id":54298259,"uuid":"340581089","full_name":"russorat/telegraf-webhooks-plex","owner":"russorat","description":"An external Telegraf Plugin for listening to Plex Webhooks.","archived":false,"fork":false,"pushed_at":"2022-01-24T23:25:53.000Z","size":149,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T01:51:16.502Z","etag":null,"topics":["plex","plex-media-server","telegraf","telegraf-plugin","webhooks"],"latest_commit_sha":null,"homepage":"","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/russorat.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}},"created_at":"2021-02-20T06:32:59.000Z","updated_at":"2022-04-19T17:27:56.000Z","dependencies_parsed_at":"2022-08-13T11:20:34.231Z","dependency_job_id":null,"html_url":"https://github.com/russorat/telegraf-webhooks-plex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russorat%2Ftelegraf-webhooks-plex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russorat%2Ftelegraf-webhooks-plex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russorat%2Ftelegraf-webhooks-plex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russorat%2Ftelegraf-webhooks-plex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/russorat","download_url":"https://codeload.github.com/russorat/telegraf-webhooks-plex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339261,"owners_count":21087214,"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":["plex","plex-media-server","telegraf","telegraf-plugin","webhooks"],"created_at":"2024-10-13T11:27:10.454Z","updated_at":"2025-04-11T03:51:50.009Z","avatar_url":"https://github.com/russorat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go](https://github.com/russorat/telegraf-webhooks-plex/actions/workflows/go.yml/badge.svg)](https://github.com/russorat/telegraf-webhooks-plex/actions/workflows/go.yml)\n\n# Plex Webhooks Input Plugin\n\nThis plugin will listen to events published from [Plex webhooks](https://support.plex.tv/articles/115002267687-webhooks/). Webhooks are a premium feature and require an active Plex Pass Subscription for the Plex Media Server account.\n\nIt is modeled after the [Telegraf Webhooks plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/webhooks).\n\nTelegraf minimum version: Telegraf 17.0\nPlugin minimum tested version: 17.3\n\n### Build and Run\n\nTo build this plugin, just run:\n\n```sh\nmake\n```\n\nWhich will build the binary `./bin/webhook-plex`\n\nYou can run it with `./bin/webhook-plex --config plugin.conf`\n\n### Configuration\n\nThis is the plugin configuration that is expected via the `--config` param\n\n```toml\n[[inputs.custom_webhooks]]\n  ## Address and port to host Webhook listener on\n  service_address = \":1619\"\n\n  [inputs.custom_webhooks.plex]\n    path = \"/plex\"\n```\n\nAnd this is an example of how to configure this with the Telegraf execd plugin that you would run with `telegraf --config telegraf.conf`\n\n```toml\n[[inputs.execd]]\n  ## One program to run as daemon.\n  ## NOTE: process and each argument should each be their own string\n  command = [\"/path/to/webhook-plex\", \"--config\", \"/path/to/plugin.conf\"]\n\n  ## Define how the process is signaled on each collection interval.\n  ## Valid values are:\n  ##   \"none\"    : Do not signal anything. (Recommended for service inputs)\n  ##               The process must output metrics by itself.\n  ##   \"STDIN\"   : Send a newline on STDIN. (Recommended for gather inputs)\n  ##   \"SIGHUP\"  : Send a HUP signal. Not available on Windows. (not recommended)\n  ##   \"SIGUSR1\" : Send a USR1 signal. Not available on Windows.\n  ##   \"SIGUSR2\" : Send a USR2 signal. Not available on Windows.\n  signal = \"none\"\n\n  ## Delay before the process is restarted after an unexpected termination\n  restart_delay = \"10s\"\n\n  ## Data format to consume.\n  ## Each data format has its own unique set of configuration options, read\n  ## more about them here:\n  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md\n  data_format = \"influx\"\n  ```\n\n### Metrics\n\nTags can vary based on the Metadata Type of the event. The field is always a counter with a value of 1. If the event is a \"rating\" event, an additional field of \"rating\" is added. \n\n- plex\n  - tags:\n    - is_user\n    - is_owner\n    - event\n    - server_title\n    - account_title\n    - is_player_local\n    - player_title\n    - metadata_content_rating\n    - metadata_director: Note, only the first director in the list is stored\n    - metadata_grandparent_title\n    - metadata_library_section_title\n    - metadata_library_section_type\n    - metadata_original_title\n    - metadata_parent_title\n    - metadata_studio\n    - metadata_title\n    - metadata_type\n    - metadata_subtype\n    - metadata_year\n    - metadata_parent_year\n  - fields:\n    - counter (int, count)\n    - rating (int, 1 - 10, only available if the event type is rating)\n\n### Example Output\n\n```\nplex,account_title=username,event=media.play,host=plexserver.lan,is_owner=true,is_player_local=true,is_user=true,metadata_content_rating=TV-14,metadata_grandparent_title=30\\ Rock,metadata_library_section_title=TV\\ Shows,metadata_library_section_type=show,metadata_parent_title=Season\\ 2,metadata_title=Jack\\ Gets\\ in\\ the\\ Game,metadata_type=episode,metadata_year=2007,player_title=Chrome,server_title=Office counter=1i 1614285785465333000\nplex,account_title=username,event=media.stop,host=plexserver.lan,is_owner=true,is_player_local=true,is_user=true,metadata_content_rating=TV-14,metadata_grandparent_title=30\\ Rock,metadata_library_section_title=TV\\ Shows,metadata_library_section_type=show,metadata_parent_title=Season\\ 2,metadata_title=Jack\\ Gets\\ in\\ the\\ Game,metadata_type=episode,metadata_year=2007,player_title=Chrome,server_title=Office counter=1i 1614285787351854000\nplex,account_title=username,event=media.play,host=plexserver.lan,is_owner=true,is_player_local=true,is_user=true,metadata_grandparent_title=Various\\ Artists,metadata_library_section_title=Music,metadata_library_section_type=artist,metadata_original_title=Britney\\ Spears,metadata_parent_title=RTL:\\ I\\ Like\\ the\\ 90’s,metadata_parent_year=2014,metadata_title=Oops!…I\\ Did\\ It\\ Again\\ (album\\ version),metadata_type=track,player_title=Chrome,server_title=Office counter=1i 1614285797801001000\nplex,account_title=username,event=media.stop,host=plexserver.lan,is_owner=true,is_player_local=true,is_user=true,metadata_grandparent_title=Various\\ Artists,metadata_library_section_title=Music,metadata_library_section_type=artist,metadata_original_title=Britney\\ Spears,metadata_parent_title=RTL:\\ I\\ Like\\ the\\ 90’s,metadata_parent_year=2014,metadata_title=Oops!…I\\ Did\\ It\\ Again\\ (album\\ version),metadata_type=track,player_title=Chrome,server_title=Office counter=1i 1614285800510840000\nplex,account_title=username,event=media.rate,host=plexserver.lan,is_owner=true,is_player_local=true,is_user=true,metadata_grandparent_title=Various\\ Artists,metadata_library_section_title=Music,metadata_library_section_type=artist,metadata_original_title=Britney\\ Spears,metadata_parent_title=RTL:\\ I\\ Like\\ the\\ 90’s,metadata_parent_year=2014,metadata_title=Oops!…I\\ Did\\ It\\ Again\\ (album\\ version),metadata_type=track,player_title=Chrome,server_title=Office counter=1i,rating=10i 1614285816914533000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussorat%2Ftelegraf-webhooks-plex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frussorat%2Ftelegraf-webhooks-plex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussorat%2Ftelegraf-webhooks-plex/lists"}