danihodovic / celery-exporter

A Prometheus exporter for Celery metrics
MIT License
399 stars 87 forks source link

No queue, no events #193

Closed andreynovikov closed 1 year ago

andreynovikov commented 1 year ago

I'm using Django + Celery + Redis + django-celery-results on a single host. Everything works like a charm. I'm trying to run celery-exporter (from cli, git cloned source master branch, tried 0.4.1 as well) and get the following:

LLEN celery in redis-cli shows that queue. Celery versions are equal in Django and celery-exporter: 5.2.3. Have no idea where to look further.

danihodovic commented 1 year ago

celery_queue_length only works for RabbitMQ https://github.com/danihodovic/celery-exporter/issues/190

As for the other metrics - do you have a worker running?

andreynovikov commented 1 year ago

Yes, worker is running, tasks are executed. Also in Django I have subscriptions for corresponding signals and they work well:

from celery.signals import task_received

@task_received.connect
def on_task_received(request, **kwargs):
   ...
andreynovikov commented 1 year ago

I've found the problem: for some reason celery didn't process CELERY_SEND_EVENTS. I have added direct setting to celery worker and it started sending all events.

andreynovikov commented 1 year ago

Any chance to merge https://github.com/danihodovic/celery-exporter/pull/192 ?

danihodovic commented 1 year ago

Any chance to merge #192 ?

I will hopefully have time to look at it before the end of the year.