{"id":13526071,"url":"https://github.com/just1not2/prometheus-exporter-yourls","last_synced_at":"2026-05-15T07:04:15.853Z","repository":{"id":41949598,"uuid":"456641064","full_name":"just1not2/prometheus-exporter-yourls","owner":"just1not2","description":"A Prometheus exporter for the YOURLS URL Shortener","archived":false,"fork":false,"pushed_at":"2022-04-22T20:07:55.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T17:46:15.347Z","etag":null,"topics":["prometheus","prometheus-exporter","yourls"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/just1not2.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-02-07T19:09:24.000Z","updated_at":"2022-02-19T23:31:23.000Z","dependencies_parsed_at":"2022-08-12T00:21:37.949Z","dependency_job_id":null,"html_url":"https://github.com/just1not2/prometheus-exporter-yourls","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just1not2%2Fprometheus-exporter-yourls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just1not2%2Fprometheus-exporter-yourls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just1not2%2Fprometheus-exporter-yourls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just1not2%2Fprometheus-exporter-yourls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/just1not2","download_url":"https://codeload.github.com/just1not2/prometheus-exporter-yourls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241460204,"owners_count":19966519,"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":["prometheus","prometheus-exporter","yourls"],"created_at":"2024-08-01T06:01:24.916Z","updated_at":"2026-05-15T07:04:10.814Z","avatar_url":"https://github.com/just1not2.png","language":"Go","funding_links":[],"categories":["Integrations"],"sub_categories":["3rd party Integrations and Frameworks"],"readme":"# YOURLS Prometheus Exporter [![Listed in Awesome YOURLS!](https://img.shields.io/badge/Awesome-YOURLS-C5A3BE)](https://github.com/YOURLS/awesome-yourls/)\n\nA Prometheus exporter to fetch some metrics from a YOURLS URL-shortener instance.\n\n## Exported metrics\n\n### Gauges\nName | Description\n--- | ---\n`yourls_clicks_total`|Total number of clicks\n`yourls_links_total`|Total number of deployed links\n\n### Go metrics\nA variety of Go metrics that describe the exporter are exported as well.\n\n\n## Installation\n\n### Docker image\nThe preferred way to use the exporter is by running the provided Docker image. It is currently available on Docker Hub:\n\n```bash\ndocker pull just1not2/prometheus-exporter-yourls:latest\n```\n\nIn addition to the `latest` tag which points to the version currently in the `main` branch, tagged versions are also available.\n\n### From source\nYou can clone the repository and build the exporter locally.\n\n```bash\ngit clone https://github.com/just1not2/prometheus-exporter-yourls.git\ncd prometheus-exporter-yourls\nmake local\n```\n\n\n## Configuration\n\n### Exporter configuration\nThere are two ways to configure the exporter:\n* Environment variables\n* Configuration file\n\nThe first method takes precedence over the second one.\n\nTo use the first one, you just have to declare environment variables while launching the Docker image, a Docker-compose or directly the executable:\n```bash\ndocker run -p 9923:9923 \\\n           -e YOURLS_URL=http://yourls.example.com \\\n           -e YOURLS_SIGNATURE=SECRET_API_KEY \\\n           just1not2/prometheus-exporter-yourls:latest\n```\n\nIf you prefer to configure your provider with the second method, you should copy the [config.json.template](./config.json.template) file and replace the sample values. You can then launch the exporter:\n```bash\ndocker run -p 9923:9923 -v $(pwd)/config.json:/config.json just1not2/prometheus-exporter-yourls:latest config.json\n```\n\nThe configuration parameters that can be declared are summarized in this table:\nParameter | Environment variable | Description | Note\n--- | --- | --- | ---\n`url`|`YOURLS_URL`|URL of the YOURLS instance|_Required_\n`signature`|`YOURLS_SIGNATURE`|Signature of the YOURLS instance|_Required_\n`exporter_port`|`YOURLS_EXPORTER_PORT`|Port on which the exporter listens|_Default is 9923_\n`exporter_timeout`|`YOURLS_EXPORTER_TIMEOUT`|Timeout of requests to the YOURLS instance|_Default is 10_\n\nThe `signature` parameter can be found at `http://\u003cyour YOURLS instance URL\u003e/admin/tools.php`.\n\n### Scrape configuration\nThe exporter will query the YOURLS server every time it is scraped by Prometheus. You can modify the configuration of the exporter to change the scrape interval:\n\n```yml\nscrape_configs:\n  - job_name: yourls\n    scrape_interval: 1m\n    static_configs:\n      - targets: ['\u003cyour YOURLS exporter host\u003e:9923']\n```\n\n\n## See also\n\n* [YOURLS official documentation](https://yourls.org)\n* [Use Prometheus exporter](https://prometheus.io/docs/instrumenting/exporters/)\n\n\n## Contributing to this exporter\n\nThis exporter started as personal project, but I welcome community contributions to this exporter. If you find problems, please open an issue or create a PR against the [YOURLS exporter repository](https://github.com/just1not2/prometheus-exporter-yourls).\n\nYou can also reach me by email at `me@just1not2.org`.\n\n\n## Licensing\n\nGNU General Public License v3.0 or later.\n\nSee [LICENSE](./LICENSE) to see the full text.\n\n\n## Author information\n\nThis exporter was created in 2022 by Justin Béra.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjust1not2%2Fprometheus-exporter-yourls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjust1not2%2Fprometheus-exporter-yourls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjust1not2%2Fprometheus-exporter-yourls/lists"}