{"id":26454124,"url":"https://github.com/coolapso/prometheus-youtube-exporter","last_synced_at":"2026-05-04T23:37:58.135Z","repository":{"id":253852043,"uuid":"844719449","full_name":"coolapso/prometheus-youtube-exporter","owner":"coolapso","description":"A Prometheus exporter to scrape metrics from the YouTube API","archived":false,"fork":false,"pushed_at":"2025-03-10T19:20:09.000Z","size":137,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T20:28:26.355Z","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/coolapso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"coolapso","buy_me_a_coffee":"coolapso"}},"created_at":"2024-08-19T20:46:00.000Z","updated_at":"2025-03-10T19:18:59.000Z","dependencies_parsed_at":"2024-11-17T20:33:01.775Z","dependency_job_id":"fc1045e8-5189-4818-b9e7-c025d3242acf","html_url":"https://github.com/coolapso/prometheus-youtube-exporter","commit_stats":null,"previous_names":["coolapso/prometheus-youtube-exporter"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapso%2Fprometheus-youtube-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapso%2Fprometheus-youtube-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapso%2Fprometheus-youtube-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapso%2Fprometheus-youtube-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coolapso","download_url":"https://codeload.github.com/coolapso/prometheus-youtube-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244292631,"owners_count":20429706,"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":"2025-03-18T19:44:30.533Z","updated_at":"2026-05-04T23:37:53.113Z","avatar_url":"https://github.com/coolapso.png","language":"Go","funding_links":["https://github.com/sponsors/coolapso","https://buymeacoffee.com/coolapso","https://www.buymeacoffee.com/coolapso"],"categories":[],"sub_categories":[],"readme":"# PROMETHEUS YOUTUBE EXPORTER\n\n[![release](https://github.com/coolapso/prometheus-youtube-exporter/actions/workflows/release.yaml/badge.svg)](https://github.com/coolapso/prometheus-youtube-exporter/actions/workflows/release.yaml)\n![GitHub Tag](https://img.shields.io/github/v/tag/coolapso/prometheus-youtube-exporter?logo=semver\u0026label=semver\u0026labelColor=gray\u0026color=green)\n[![Docker image version](https://img.shields.io/docker/v/coolapso/youtube-exporter/latest?logo=docker)](https://hub.docker.com/r/coolapso/youtube-exporter)\n[![Go Report Card](https://goreportcard.com/badge/github.com/coolapso/prometheus-youtube-exporter)](https://goreportcard.com/report/github.com/coolapso/prometheus-youtube-exporter)\n![GitHub Sponsors](https://img.shields.io/github/sponsors/coolapso?style=flat\u0026logo=githubsponsors)\n\nA Prometheus exporter to scrape metrics from the YouTube API.\n\nI currently use this exporter solely to monitor the status of my 24/7 live stream @thearcticskies, so it is the only feature available at the moment. If you need additional features, feel free to open a feature request or submit a pull request with your contribution.\n\n## Install\n\nCurrently you can only grab one of the binaries provided in the releases page, or run it using docker. Check each use case examples for more details.\n\n## Exported Metrics\n\n| Metric | Meaning | Labels | type |\n| ------ | ------- | ------ | ---- |\n| youtube_channel_is_live | If Youtube channel live stream is broadcasting | channel_name | gauge |\n\n## Usage\n* Create an API key. For instructions, see [Google API Support](https://support.google.com/googleapi/answer/6158862?hl=en\u0026ref_topic=7013279).\n* Start the the exporter providing at least the API Key and a list of channels to monitor \n\n```\nPrometheus Youtube Exporter\n\nUsage:\n  youtube-exporter [flags]\n\nFlags:\n      --address string        The address to access the exporter used for oauth redirect uri (default \"localhost\")\n      --api.key string        Youtube API Key (default \"localhost\")\n      --channel.ids strings   The ids of youttube channels to monitor\n  -h, --help                  help for youtube-exporter\n      --listen.port string    Port to listen at (default \"9101\")\n      --log.format string     Exporter log format, text or json (default \"text\")\n      --log.level string      Exporter log level (default \"info\")\n      --metrics.path string   Path to expose metrics at (default \"/metrics\")\n```\n\nYou can also use environment variables. The most accurate list for them is available [here](cmd/root.go).\n\n### Example \n\n*Using flags:*\n```\n./youtube-exporter --api.key \u003cApiKey\u003e --channel.ids \"foo,bar\"\n```\n\n*Using Environment Variables:*\n```\nYT_CHANNEL_IDS=\"foo bar\" YT_API_KEY=\"APIKEY\" ./youtube-exporter\n```\n\n*With docker, using flags:*\n```\ndocker run -d -p 10020:10020 \\\n        coolapso/youtube-exporter \\\n        --api.key=apiKey \\\n        --channel.ids=\"chan1,chan2,chan3\"\n```\n\n*With Docker, using environment variables:*\n```\ndocker run -d -p 10020:10020 \\\n        -e YT_API_KEY=\u003cApiKey\u003e \\\n        -e YT_CHANNEL_IDS=\"chan1 chan2 chan3\" \\\n        coolapso/youtube-exporter\n```\n\n## Troubleshooting\n\n### Exporter reports broadcast is offline even when it is actively broacasting\n\nMake sure you have the option: \"Unlist live replay once stream ends\" Turned off when you start the live stream, Youtube API returns different values than expected when this setting is turnned on. More details on [issue #19](https://github.com/coolapso/prometheus-youtube-exporter/issues/19)\n\n\n\n# Contributions\n\nImprovements and suggestions are always welcome. Feel free to check for any open issues, or open a new issue or pull request.\n\nIf you like this project and want to support / contribute in a different way you can always [:heart: Sponsor Me](https://github.com/sponsors/coolapso) or\n\n\u003ca href=\"https://www.buymeacoffee.com/coolapso\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 51px !important;width: 217px !important;\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolapso%2Fprometheus-youtube-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolapso%2Fprometheus-youtube-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolapso%2Fprometheus-youtube-exporter/lists"}