Skip to content

Latest commit

 

History

History
150 lines (102 loc) · 4.12 KB

CONFIGURATION.md

File metadata and controls

150 lines (102 loc) · 4.12 KB

Configuration

Celery Insights can be configured using environment variables. Additional preferences can be found on the Settings page within the app.

By default, Celery Insights uses only Broker URL and Result Backend to connect to your Celery Cluster.

In case you have set up a Config File, Celery Insights will prefer it over the BROKER_URL and RESULT_BACKEND environment variables.

If your setup requires extra Celery dependencies (e.g. msgpack, sqs, etc.), you may use the celery-insights-all Docker image instead.

❗ Tip

If you want Celery Insights to access a local service, like a Redis container, use host.docker.internal instead of localhost. See more on Docker docs

BROKER_URL

Default: amqp://guest:guest@host.docker.internal/

Specify the Celery Broker URL. See more on Celery docs.

RESULT_BACKEND

Default: redis://host.docker.internal:6379/0

Specify the Celery Result Backend. See more on Celery docs.](https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-backend)]

CONFIG_FILE

Default: /app/config.py

Specify the path where the Config File should be located for Celery Insights. For instructions on how to set it up, refer to the Setup with Config File section.

MAX_TASKS

Default 10000

Specify how many tasks can be stored in memory.

MAX_WORKERS

Default 5000

Specify how many workers can be stored in memory.

HOST

Default: 0.0.0.0

Specify Celery Insights hostname. By default, it will listen to all IP addresses.

PORT

Default: 8555

Specify Celery Insights port number.

TIMEZONE

Default: "UTC"

Specify the time zone for your cluster. For correct timestamps, it should be the same as your Celery nodes. All timestamps shown on the app are translated to the client's local timezone.

DEBUG

Default: False

Enables Celery Insights to run in debug mode, that includes hot-reload, response tracebacks and Celery event logs.

Setup with Config File

In certain situations, connecting to your Celery cluster may require more than simply specifying the Broker URL and Result Backend. For such cases, you can configure Celery Insights using a Celery configuration file.

Create a config.py file containing all the necessary Celery configurations. For example:

broker_url = 'sentinel://localhost:26379;sentinel://localhost:26380;sentinel://localhost:26381'
broker_transport_options = {
    'sentinel_kwargs': {
        'master_name': "cluster1",
        'password': "password",
    },
}
result_backend_transport_options = {'master_name': "cluster1"}
result_accept_content = "msgpack"

Then mount it inside Celery Insights container, for example:

docker run -v ./config.py:/app/config.py -p 8555:8555 --name celery-insights ghcr.io/danyi1212/celery-insights:latest

Support chart

✅ - Fully Supported ✔️ - Supported with celery-insights-all ☑️ - Limited features ❌ - Not supported

Serializers

  • ✔️ auth
  • ✔️ msgpack
  • ✔️ yaml

Brokers

  • ✅ RabbitMQ
  • ✅ Redis
  • ❌ Amazon SQS
  • ✔️ Zookeeper

Result Backends

  • ✅ Redis
  • ☑️ RPC
  • ✔️ Memcache
  • ✔️ SQLAlchemy
  • ✔️ MongoDB
  • ❌ Casandra
  • ❌ IronCache
  • ✔️ S3
  • ✔️ Azure Block Blob
  • ✔️ ElasticSearch
  • ✔️ AWS DynamoDB
  • ❌ Couchbase
  • ✔️ CouchDB
  • ✔️ ArangoDB
  • ✔️ CosmoDB
  • ☑️ File-System
  • ✔️ Consul
  • ✔️ Riak
  • ❌ Django ORM

Feel free to submit a feature request to support more setups.