Celery: Monitoring

Learn how to monitor the tasks in Celery.

We'll cover the following

Celery comes with a lot of monitoring tools built in, and this allows you to supervise things and get information about what is going on inside the cluster. This also makes it a great option over a custom built solution where all of this would have to be implemented again.

Note: The example in this lesson assumes that you have a Redis server. We already run a Redis server as a daemon when Run is clicked on a widget so you do not need to worry about starting the server yourself.

Status

To run the following application, enter command python celery-task-queue.py, then open another terminal and enter command cd examples/queue-based-distribution/ to move to the relevant directory. Then, enter the command: celery -A celery-task-queue worker --queues celery,low-priority. The program will keep waiting until the worker is started. Now, open yet another terminal and enter command cd examples/queue-based-distribution/ and then enter celery -A celery-task-queue status as the basic monitoring command is status, which returns the state of the workers.

Get hands-on with 1400+ tech skills courses.