{"id":13527604,"url":"https://github.com/UpHabit/bull_exporter","last_synced_at":"2025-04-01T09:31:49.459Z","repository":{"id":38885559,"uuid":"152642115","full_name":"UpHabit/bull_exporter","owner":"UpHabit","description":" Prometheus exporter for Bull metrics","archived":false,"fork":false,"pushed_at":"2024-05-28T08:38:26.000Z","size":1604,"stargazers_count":263,"open_issues_count":50,"forks_count":61,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-28T21:34:58.993Z","etag":null,"topics":["bull","hacktoberfest","metrics","prometheus-exporter","queue"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/UpHabit.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-11T19:06:16.000Z","updated_at":"2024-05-29T22:38:03.761Z","dependencies_parsed_at":"2024-04-06T01:32:16.764Z","dependency_job_id":"f7a3e059-166b-4b1d-bb28-39edd73b58c2","html_url":"https://github.com/UpHabit/bull_exporter","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpHabit%2Fbull_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpHabit%2Fbull_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpHabit%2Fbull_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpHabit%2Fbull_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UpHabit","download_url":"https://codeload.github.com/UpHabit/bull_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246616233,"owners_count":20806089,"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":["bull","hacktoberfest","metrics","prometheus-exporter","queue"],"created_at":"2024-08-01T06:01:53.631Z","updated_at":"2025-04-01T09:31:48.765Z","avatar_url":"https://github.com/UpHabit.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Bull Queue Exporter\n**Prometheus exporter for Bull metrics.**\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"https://travis-ci.org/UpHabit/bull_exporter/branches/\"\u003e\n    \u003cimg src=\"https://travis-ci.org/UpHabit/bull-prom-metrics.svg?branch=master\"/\u003e\n  \u003c/a\u003e\n  \u003cbr/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://prometheus.io/\"\u003e\n    \u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Prometheus_software_logo.svg/115px-Prometheus_software_logo.svg.png\" height=\"115\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/OptimalBits/bull\"\u003e\n    \u003cimg src=\"https://github.com/OptimalBits/bull/blob/develop/support/logo@2x.png\" height=\"115\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n___\n\n\n## UI\n![Grafana Dashboard](./docs/img/grafana-1.png)\n\n## Setup\n#### Prometheus\n**An existing prometheus server is required to use this project**\n\nTo learn more about how to setup promethues and grafana see: https://eksworkshop.com/monitoring/\n\n#### Grafana\nThe dashboard pictured above is [available to download from grafana](https://grafana.com/grafana/dashboards/10128).\nIt will work aslong as EXPORTER_STAT_PREFIX is not changed.\n\n## Queue Discovery\nQueues are discovered at start up by running `KEYS bull:*:id` \nthis can also be triggered manually from the `/discover_queues` endpoint\n`curl -XPOST localhost:9538/discover_queues`\n\n## Metrics\n\n| Metric                       | type    | description |\n|------------------------------|---------|-------------|\n| bull_queue_completed         | counter | Total number of completed jobs                          |\n| bull_queue_complete_duration | summary | Processing time for completed jobs                      |\n| bull_queue_active            | counter | Total number of active jobs (currently being processed) |\n| bull_queue_delayed           | counter | Total number of jobs that will run in the future        |\n| bull_queue_failed            | counter | Total number of failed jobs                             |\n| bull_queue_waiting           | counter | Total number of jobs waiting to be processed            |\n\n## Kubernetes Usage\n\n### Environment variables for default docker image\n\n| variable              | default                  | description                                     |\n|-----------------------|--------------------------|-------------------------------------------------|\n| EXPORTER_REDIS_URL    | redis://localhost:6379/0 | Redis uri to connect                            |\n| EXPORTER_PREFIX       | bull                     | prefix for queues                               |\n| EXPORTER_STAT_PREFIX  | bull_queue_              | prefix for exported metrics                     |\n| EXPORTER_QUEUES       | -                        | a space separated list of queues to check       |\n| EXPORTER_AUTODISCOVER | -                        | set to '0' or 'false' to disable queue discovery|\n\n\n### Example deployment\n\nsee: [k8s-sample.yaml](./docs/k8s-sample.yaml) for more options\n\n```yaml\napiVersion: apps/v1\n\nkind: Deployment\nmetadata:\n  name: bull-exporter\n  labels:\n    app: bull\n    role: exporter\n\nspec:\n  selector:\n    matchLabels:\n      app: bull\n      role: exporter\n  replicas: 1\n  template:\n    metadata:\n      labels:\n        app: bull\n        role: exporter\n    spec:\n      containers:\n        - name: bull-exporter\n          image: uphabit/bull_exporter:latest\n          securityContext:\n            runAsGroup: 65534 # nobody\n            runAsUser: 65534 # nobody\n            runAsNonRoot: true\n            privileged: false\n            allowPrivilegeEscalation: false\n            readOnlyRootFilesystem: true\n            capabilities:\n              drop:\n                - all\n          resources:\n            requests:\n              cpu: 100m\n              memory: 128M\n            limits:\n              cpu: 200m\n              memory: 512M\n          env:\n              # space delimited list of queues\n            - name: EXPORTER_QUEUES\n              value: \"mail job_one video audio\"\n\n              # find the redis service in the cluster\n            - name: EXPORTER_REDIS_URL\n              value: redis://redis:6379/0\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: bull-exporter\n  labels:\n    app: bull\n    role: exporter\n  annotations:\n    prometheus.io/scrape: 'true'\n    prometheus.io/port: '9538'\nspec:\n  type: ClusterIP\n  ports:\n    - name: http\n      port: 9538\n      targetPort: 9538\n  selector:\n    app: bull\n    role: exporter\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUpHabit%2Fbull_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUpHabit%2Fbull_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUpHabit%2Fbull_exporter/lists"}