How to view all the charts on the tab "Celery Flower Monitor"

Running Celery 3.1.16 with the back of RabbitMQ 3.4.1 and using Flower 0.7.3 on Python3.4 to monitor my celery tasks. I have several tasks, and I can view their results on the task tab "Celery Flower".

The monitor tab has 4 sections. Tasks completed, failed tasks, task lead times, and broker. Of these 4, only the broker view shows a traffic graph. Is there a parameter that allows other graphs to show statistics?

flowerconfig.py

 # Broker settings BROKER_URL = 'amqp://guest: guest@localhost :5672//' # RabbitMQ management api broker_api = 'http://guest: guest@localhost :15672/api/' #Port port = 5555 # Enable debug logging logging = 'INFO' 

Supervisor: flower.conf

 [program:flower] command=/opt/apps/venv/my_app/bin/celery flower --app=celery_conf.celeryapp --conf=flowerconfig directory=/opt/apps/my_app/celery_conf user=www-data autostart=true autorestart=true startsecs=10 redirect_stderr=true stderr_logfile=/var/log/celery/flower.err.log stdout_logfile=/var/log/celery/flower.out.log 

While he was on it, in Broker's graph I have two lines, one green - red. However, the one that appears on the graph is red, but both of them work, and I can view their results in the Tasks window.

I noticed something unusual in the Config tab in the Workers tab in color. CELERY_ROUTE and CELERY_QUEUES are displayed as empty lists, while all other fields look as if they selected the correct data from the celeryconfig file.

 BROKER_URL amqp://guest:********@localhost:5672// CELERYBEAT_SCHEDULE {} CELERYD_PREFETCH_MULTIPLIER 0 CELERY_ALWAYS_EAGER False CELERY_AMQP_TASK_RESULT_EXPIRES 60 CELERY_CREATE_MISSING_QUEUES False CELERY_DEFAULT_EXCHANGE default CELERY_DEFAULT_QUEUE default CELERY_DEFAULT_ROUTING_KEY ******** CELERY_IMPORTS ['student.admission', 'student.schedule'] CELERY_INCLUDE ['celery.app.builtins', 'student.schedule', 'student.admission'] CELERY_QUEUES [{}, {}, {}, {}, {}] #<==== Should it show an empty list? CELERY_RESULT_BACKEND amqp://guest: guest@localhost :5672// CELERY_ROUTES [{}, {}, {}, {}] #<==== Should it show an empty list? CELERY_STORE_ERRORS_EVEN_IF_IGNORED True CELERY_TASK_RESULT_EXPIRES 3600 

celeryconfig.py looks like this:

 BROKER_URL = 'amqp://guest: guest@localhost :5672//' CELERY_RESULT_BACKEND = 'amqp://guest: guest@localhost :5672//' #Task settings CELERY_TASK_RESULT_EXPIRES = 3600 CELERY_AMQP_TASK_RESULT_EXPIRES = 60 CELERYD_PREFETCH_MULTIPLIER = 0 CELERY_ALWAYS_EAGER = False CELERY_CREATE_MISSING_QUEUES = False CELERY_STORE_ERRORS_EVEN_IF_IGNORED = True #Scripts to be imported CELERY_IMPORTS=('student.admission', 'student.schedule') #Celery Exchanges, Queues, Routes default_exchange = Exchange('default', type='direct') student_admission_exchange = Exchange('student_admission_exchange', type='direct', durable=False) CELERY_QUEUES = ( Queue('default', default_exchange, routing_key='default'), Queue('student_admission_queue', student_admission_exchange, routing_key='admission', durable=False), ) CELERY_ROUTES = ( {'student.admission.admit': {'queue': 'student_admission_queue','routing_key': 'admission'}}, ) CELERY_DEFAULT_QUEUE = 'default' CELERY_DEFAULT_EXCHANGE = 'default' CELERY_DEFAULT_ROUTING_KEY = 'default' 

Edit

As I can see, I'm not the only one stuck with this, although I include a screenshot of the “missing” charts as a guide.

Celery: Uncharted Graphs

+5
source share
1 answer

In my case, this is not a problem with the Color itself, but with the fact that the timestamps of my tasks were not accurate (as shown in the message “Significant drift from *** may mean that the clock is not synchronized” in my celery logs). Fixing the clock may be the answer.

The flower determines whether the event is new (and therefore should be built) by comparing the timestamp with the event with the timestamp when it updated the latest schedule (see https://github.com/mher/flower/blob/master/ flower / views / monitor.py # L47 ). In my case, this comparison was always false, so there were no events.

+1
source

Source: https://habr.com/ru/post/1207276/


All Articles