Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add authentication and endpoint to Django Celery Flower Monitoring?

I've been using flower locally and it seems easy enough to setup and run, but I can't see how I would set it up in a production environment.

In particular, how can I add authentication and how would I define a url to access it?

like image 553
tzenderman Avatar asked Oct 10 '13 15:10

tzenderman


People also ask

How do you use Celery flower?

1 Flower uses Celery 5 and has to be invoked in the same style as celery commands do. The key takeaway here is that the Celery app's arguments have to be specified after the celery command and Flower's arguments have to be specified after the flower sub-command. More info on available Celery command args.

What is airflow flower?

Flower is a web based tool for monitoring and administrating Celery clusters. This topic describes how to configure Airflow to secure your flower instance. This is an optional component that is disabled by default in Community deployments and you need to configure it on your own if you want to use it.


1 Answers

For custom address, use the --address flag. For auth, use the --basic_auth flag.

See below:

# celery flower --help
Usage: /usr/local/bin/celery [OPTIONS]

Options:

  --address                        run on the given address
  --auth                           regexp  of emails to grant access
  --basic_auth                     colon separated user-password to enable
                                   basic auth
  --broker_api                     inspect broker e.g.
                                   http://guest:guest@localhost:15672/api/
  --certfile                       path to SSL certificate file
  --db                             flower database file (default flower.db)
  --debug                          run in debug mode (default False)
  --help                           show this help information
  --inspect                        inspect workers (default True)
  --inspect_timeout                inspect timeout (in milliseconds) (default
                                   1000)
  --keyfile                        path to SSL key file
  --max_tasks                      maximum number of tasks to keep in memory
                                   (default 10000) (default 10000)
  --persistent                     enable persistent mode (default False)
  --port                           run on the given port (default 5555)
  --url_prefix                     base url prefix
  --xheaders                       enable support for the 'X-Real-Ip' and
                                   'X-Scheme' headers. (default False)
like image 111
Neil Avatar answered Oct 14 '22 04:10

Neil