Configuration

Flower can be configured from the command line:

$ flower --auto_refresh=False

Using flowerconfig.py configuration file:

# Broker settings
BROKER_URL = 'amqp://guest:guest@localhost:5672//'

# RabbitMQ management api
broker_api = 'http://guest:guest@localhost:15672/api/'

# Enable debug logging
logging = 'DEBUG'

Or, using the environment variables. All flower options should be prefixed with FLOWER_:

$ export FLOWER_BASIC_AUTH=foo:bar

Options passed through the command line have precedence over the options defined in the configuration file. The configuration file name and path can be changed with conf option.

Options

Standard Celery configuration settings can be overridden in the configuration file. See Celery Configuration reference for a complete listing of all the available settings, and their default values.

Celery command line options also can be passed to Flower. For example the –broker sets the default broker url:

$ flower -A proj --broker=amqp://guest:guest@localhost:5672//

For a full list of options see:

$ celery --help

address

Run the http server on a given address

auth

Enables Google OpenID authentication. auth is a regexp of emails to grant access. For more info see Google OAuth 2.0

auto_refresh

Refresh dashboards automatically (by default, auto_refresh=True)

basic_auth

Enables HTTP Basic authentication. basic_auth is a comma separated list of username:passworrd. See HTTP Basic Authentication for more info.

broker_api

Flower uses RabbitMQ Managment Plugin to get info about queues. broker_api is a URL of RabbitMQ HTTP API including user credentials.

$ flower -A proj --broker_api=http://username:password@rabbitmq-server-name:15672/api/

Note

By default the managment plugin is not enabled. To enable it run:

$ rabbitmq-plugins enable rabbitmq_management

Note

The port number for RabbitMQ versions prior to 3.0 is 55672.

certfile

A path to SSL certificate file

conf

A path to the configuration file (by default, flowerconfig.py)

db

A database file to use if persistent mode is enabled (by default, db=flower)

debug

Enable the debug mode (by default, debug=False)

enable_events

Periodically enable Celery events by using enable_events command (by default, enable_event=True)

format_task

Modifies the default task formatting. format_task function should be defined in the flowerconfig.py configuration file. It accepts a task object and returns the modified version.

format_task is useful for filtering out sensitive information.

The example below shows how to filter arguments and limit display lengths:

from flower.utils.template import humanize

def format_task(task):
    task.args = humanize(task.args, length=10)
    task.kwargs.pop('credit_card_number')
    task.result = humanize(task.result, length=20)
    return task

inspect_timeout

Sets worker inspect timeout (by default, inspect_timeout=10000 in milliseconds)

keyfile

A path to SSL key file

max_tasks

Maximum number of tasks to keep in memory (by default, max_tasks=10000)

natural_time

Show time relative to the refresh time (by default, natural_time=True)

persistent

Enable persistent mode. If the persistent mode is enabled Flower saves the current state and reloads on restart (by default, persistent=False)

port

Run the http server on a given port (by default, port=5555)

xheaders

Enable support of X-Real-Ip and X-Scheme headers (by default, xheaders=False)