Skip to main content

rq-dashboard is a general purpose, lightweight, web interface to monitor your RQ queues, jobs, and workers in realtime.

Project description

Introduction

rq-dashboard is a general purpose, lightweight, Flask-based web front-end to monitor your RQ queues, jobs, and workers in realtime.

Build Pull Request Publish Release Python Support PyPI Downloads

Maturity notes

The RQ dashboard is currently being developed and is in beta stage. How migrate to version 1.0 you can find here

You can find help in the discussion page in github or join our discord server

Installing with Docker

You can also run the dashboard inside of docker:

  • copy the docker-compose.yml file from the root of the repository to docker-compose.override.yml and change the environment variables to your liking.

  • run the following command:

    $ docker-compose up
    

You can also find the official image on cjlapao/rq-dashboard:latest

Installing from PyPI

$ pip install rq-dashboard

Running the dashboard

Run the dashboard standalone, like this:

$ rq-dashboard
* Running on http://127.0.0.1:9181/
...
$ rq-dashboard --help
Usage: rq-dashboard [OPTIONS]

  Run the RQ Dashboard Flask server.

  All configuration can be set on the command line or through environment
  variables of the form RQ_DASHBOARD_*. For example RQ_DASHBOARD_USERNAME.

  A subset of the configuration (the configuration parameters used by the
  underlying flask blueprint) can also be provided in a Python module
  referenced using --config, or with a .cfg file referenced by the
  RQ_DASHBOARD_SETTINGS environment variable.

Options:
  -b, --bind TEXT                 IP or hostname on which to bind HTTP server
  -p, --port INTEGER              Port on which to bind HTTP server
  --url-prefix TEXT               URL prefix e.g. for use behind a reverse
                                  proxy
  --username TEXT                 HTTP Basic Auth username (not used if not
                                  set)
  --password TEXT                 HTTP Basic Auth password
  -c, --config TEXT               Configuration file (Python module on search
                                  path)
  -u, --redis-url TEXT            Redis URL. Can be specified multiple times.
                                  Default: redis://127.0.0.1:6379
  --poll-interval, --interval INTEGER
                                  Refresh interval in ms
  --extra-path TEXT               Append specified directories to sys.path
  --disable-delete                Disable delete jobs, clean up registries
  --debug / --normal              Enter DEBUG mode
  -v, --verbose                   Enable verbose logging
  -j, --json                      Enable JSONSerializer
  --help                          Show this message and exit.

Integrating the dashboard in your Flask app

The dashboard can be integrated in to your own Flask app by accessing the blueprint directly in the normal way, e.g.:

from flask import Flask
import rq_dashboard

app = Flask(__name__)
app.config.from_object(rq_dashboard.default_settings)
rq_dashboard.web.setup_rq_connection(app)
app.register_blueprint(rq_dashboard.blueprint, url_prefix="/rq")

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == "__main__":
    app.run()

If you start the Flask app on the default port, you can access the dashboard at http://localhost:5000/rq. The cli.py:main entry point provides a simple working example.

Running on Heroku

Consider using third-party project rq-dashboard-on-heroku, which installs rq-dashboard from PyPI and wraps in in Gunicorn for deployment to Heroku. rq-dashboard-on-heroku is maintained indepdently.

Running behind a Reverse Proxy

You can run the dashboard as a systemd service in Linux or via a suprevisor script and then use Apache or NGINX to direct traffic to the dashboard.

This is for non-production functionality!

Apache Reverse Proxy example:

ProxyPass /rq http://127.0.0.1:5001/rq
ProxyPassReverse /rq http://127.0.0.1:5001/rq

Systemd service example:

[Unit]
Description=Redis Queue Dashboard
[Install]

WantedBy=multi-user.target
[Service]
ExecStart=/bin/rq-dashboard -b 127.0.0.1 -p 5001 --url-prefix /rq -c rq_settings_dashboard --debug -v
StandardOutput=file:/var/log/redis/rq-dasbhoard.log
StandardError=file:/var/log/redis/rq-dashboard.log
User=redis-dash
Group=redis-dash
RemainAfterExit=yes
Type=simple
PermissionsStartOnly=false
PrivateTmp=no
  • --debug,-v are optional -- they will write stdout to your specified files.
  • rq_settings_dashboard is a Python file, with settings defined. You can use options that are available as environmental variables. (EX. RQ_DASHBOARD_REDIS_PASSWORD = password)

Developing

Develop in a virtualenv and make sure you have all the necessary build time (and run time) dependencies with

$ pip install -r requirements.txt

Develop in the normal way with

$ python setup.py develop

Stats

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rq_dashboard-0.8.4.tar.gz (206.1 kB view details)

Uploaded Source

Built Distribution

rq_dashboard-0.8.4-py2.py3-none-any.whl (210.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file rq_dashboard-0.8.4.tar.gz.

File metadata

  • Download URL: rq_dashboard-0.8.4.tar.gz
  • Upload date:
  • Size: 206.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rq_dashboard-0.8.4.tar.gz
Algorithm Hash digest
SHA256 10420e0d2e70d1338dcbdb18c7b1a7a247aa79e842ea6c4a6f849a86297b170b
MD5 2e681b0c88eec1a78c2582b63b0435be
BLAKE2b-256 9acf6fc299ac82e653f87e56569a7b6e0fa0ca7815a743b84c0dd0715d4ea9a0

See more details on using hashes here.

File details

Details for the file rq_dashboard-0.8.4-py2.py3-none-any.whl.

File metadata

  • Download URL: rq_dashboard-0.8.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 210.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rq_dashboard-0.8.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7a2cc43f23cd4c01dc4ead8a94e887cc64466b597085f5275bea7cc234696909
MD5 688c8dfd252f3ccb8c3f125bcebc990d
BLAKE2b-256 6b2f8764bb76c3ba61e9ddeb10f75ee86c0b810f390981a79e3c555404f91b69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page