Exporter for Celery related metrics in order to get picked up by Prometheus.
So far it provides access to the following metrics:
-
celery_tasksexposes the number of tasks currently known to the queue grouped bystate(RECEIVED, STARTED, ...). -
celery_tasks_by_nameexposes the number of tasks currently known to the queue grouped bynameandstate. -
celery_task_durationsexposes the task execution durations grouped bynameandstate. -
celery_task_exceptionsexposes the task failure exceptions durations grouped bynameandexception. -
celery_workersexposes the number of currently probably alive workers -
celery_queue_lengthsexposes the lengths of celery queues
$ python setup.py install
$ celery-exporter
[2018-04-06 13:08:35,766] root:INFO: Starting HTTPD on 0.0.0.0:8888Celery workers have to be configured to send task-related events: http://docs.celeryproject.org/en/latest/userguide/configuration.html#worker-send-task-events.
By default, the HTTPD will listen at 0.0.0.0:8888. If you want the HTTPD
to listen to another port, use the --addr option or the environment variable
DEFAULT_ADDR.
By default, this will expect the broker to be available through
redis://127.0.0.1:6379/0. You can change it via environment variable
DEFAULT_BROKER or by passing --broker option.