{"id":16304969,"url":"https://github.com/moznion/resque_exporter","last_synced_at":"2025-03-22T20:32:37.471Z","repository":{"id":46694639,"uuid":"59344161","full_name":"moznion/resque_exporter","owner":"moznion","description":"An exporter of Prometheus for resque's status.","archived":false,"fork":false,"pushed_at":"2024-01-28T13:37:05.000Z","size":22,"stargazers_count":12,"open_issues_count":2,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-17T23:57:27.041Z","etag":null,"topics":["prometheus","resque"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moznion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-21T05:46:50.000Z","updated_at":"2023-04-26T12:16:35.000Z","dependencies_parsed_at":"2022-08-27T05:23:32.275Z","dependency_job_id":null,"html_url":"https://github.com/moznion/resque_exporter","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fresque_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fresque_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fresque_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fresque_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moznion","download_url":"https://codeload.github.com/moznion/resque_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221839025,"owners_count":16889569,"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","resque"],"created_at":"2024-10-10T21:05:19.902Z","updated_at":"2024-10-28T14:16:02.904Z","avatar_url":"https://github.com/moznion.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"resque_exporter\n==\n\nAn exporter of [Prometheus](https://prometheus.io) for [resque](https://github.com/resque/resque)'s status.\n\nUsage\n--\n\n```\nOptions:\n\n  -h, --help            display help\n  -v, --version         display version and revision\n  -p, --port[=5555]     set port number\n  -c, --config          set path to config file\n```\n\ne.g.\n\n```\n$ ./resque_exporter --config /path/to/config.yml\n```\n\nDescription\n--\n\nThis exporter exports following items.\n\n- Number of remained jobs in queue\n- Number of processed jobs\n- Number of failed jobs\n- Number of jobs in the `failed` queue\n- Number of total workers\n- Number of active workers\n- Number of idle workers\n\nPaths that supported by this exporter\n--\n\n| Paths    | Description           |\n| -------- | --------------------- |\n| /metrics | Exports metrics       |\n| /\\*      | Path for health check |\n\nConfiguration\n--\n\nYou may write configuration file and pass that through CLI option.  \nPlease refer to [sample_config.yml](./sample_config.yml).\n\nSample Output\n--\n\n```\n# HELP resque_jobs_in_queue Number of remained jobs in queue\n# TYPE resque_jobs_in_queue gauge\nresque_jobs_in_queue{queue_name=\"image_converting\"} 0\nresque_jobs_in_queue{queue_name=\"log_compression\"} 0\n# HELP resque_failed Number of failed jobs\n# TYPE resque_failed gauge\nresque_failed 123\n# HELP failed_queue_count Number of jobs in the failed queue\n# TYPE failed_queue_count gauge\nfailed_queue_count 1\n# HELP resque_processed Number of processed jobs\n# TYPE resque_processed gauge\nresque_processed 1.234567e+06\n# HELP resque_active_workers Number of active workers\n# TYPE resque_active_workers gauge\nresque_active_workers 2\n# HELP resque_idle_workers Number of idle workers\n# TYPE resque_idle_workers gauge\nresque_idle_workers 8\n# HELP resque_total_workers Number of workers\n# TYPE resque_total_workers gauge\nresque_total_workers 10\n```\n\nMechanism\n--\n\nThis exporter accesses to redis to aggregate status.\n\n1. Collect name of queues via `\u003cnamespace\u003e:queues` entry (by using [SMEMBERS](http://redis.io/commands/smembers))\n1. Get number of remained jobs for each queue via `\u003cnamespace\u003e:queue:\u003cqueue_name\u003e` entry (by using [LLEN](http://redis.io/commands/llen))\n1. Get number of processed jobs via `\u003cnamespace\u003e:stat:processed`\n1. Get number of failed jobs via `\u003cnamespace\u003e:stat:failed`\n1. Collect name of workers via `\u003cnamespace\u003e:workers` entry (by using [SMEMBERS](http://redis.io/commands/smembers))\n1. Count number of active workers and idle workers by getting for each workers status entry `\u003cnamespace\u003e:worker:\u003cworker_name\u003e`.\n\nHealth Check\n--\n\nAny paths that except for `/metrics` returns response for health check. It returns 200 HTTP status code.\n\nNote\n--\n\nThis exporter also supports resque compatible job-queue engine (e.g. [jesque](https://github.com/gresrun/jesque)).\n\n[For developers] How to build to release\n--\n\nExecute `VERSION=${version} make`. Built binaries will be on `bin` directory.\n\nLicense\n--\n\n```\nThe MIT License (MIT)\nCopyright © 2016 moznion, http://moznion.net/ \u003cmoznion@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fresque_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoznion%2Fresque_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fresque_exporter/lists"}