---
title: Celery
description: Monitor the health and performance of Celery workers.
breadcrumbs: Docs > Integrations > Celery
---

# Celery
Supported OS Integration version2.5.1
## Overview{% #overview %}

This check monitors [Celery](https://docs.celeryq.dev/en/stable/userguide/monitoring.html) through the Datadog Agent. Celery is a distributed task queue system that enables asynchronous task processing in Python applications.

The Celery integration provides valuable insights into your task queue system by:

- Monitoring worker health, status, and task execution metrics
- Tracking task processing rates, runtime, and prefetch times
- Providing visibility into worker performance and task distribution
- Helping identify bottlenecks and optimize task processing efficiency

**Minimum Agent version:** 7.66.0

## Setup{% #setup %}

Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates](https://docs.datadoghq.com/agent/kubernetes/integrations.md) for guidance on applying these instructions.

### Installation{% #installation %}

The Celery check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package. No additional installation is needed on your server.

### Prerequisites{% #prerequisites %}

1. Install and configure [Celery Flower](https://flower.readthedocs.io/en/latest/prometheus-integration.html), the real-time web monitor and administration tool for [Celery](https://docs.celeryq.dev/en/stable/userguide/monitoring.html).

### Configuration{% #configuration %}

1. Edit the `celery.d/conf.yaml` file in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your Celery performance data. See the [sample celery.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/celery/datadog_checks/celery/data/conf.yaml.example) for all available configuration options.

   ```yaml
   init_config:
   
   instances:
     ## @param openmetrics_endpoint - string - required
     ## Endpoint exposing the Celery Flower's Prometheus metrics
     #
     - openmetrics_endpoint: http://localhost:5555/metrics
   ```

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands.md#start-stop-and-restart-the-agent).

### Validation{% #validation %}

[Run the Agent's status subcommand](https://docs.datadoghq.com/agent/guide/agent-commands.md#agent-status-and-information) and look for `celery` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **celery.flower.events.count**(count)                | The count of Celery events from the last submission.*Shown as event*             |
| **celery.flower.events.created**(gauge)              | The number of Celery events created.*Shown as event*                             |
| **celery.flower.task.prefetch\_time.seconds**(gauge) | Time tasks spend waiting at worker before execution.*Shown as second*            |
| **celery.flower.task.runtime.created**(gauge)        | Task runtime creation timestamp.*Shown as second*                                |
| **celery.flower.task.runtime.seconds.bucket**(count) | The number of observations within each distribution bucket of the tasks runtime. |
| **celery.flower.task.runtime.seconds.count**(count)  | Task runtime duration.*Shown as second*                                          |
| **celery.flower.task.runtime.seconds.sum**(count)    | The total duration of a task runtime.*Shown as second*                           |
| **celery.flower.worker.executing\_tasks**(gauge)     | Number of tasks currently executing at a worker.*Shown as task*                  |
| **celery.flower.worker.online**(gauge)               | Worker online status (1 for online, 0 for offline).                              |
| **celery.flower.worker.prefetched\_tasks**(gauge)    | Number of tasks prefetched at a worker.*Shown as task*                           |

### Events{% #events %}

The Celery integration does not include any events.

### Service Checks{% #service-checks %}

The Celery integration includes the following service check:

**celery.flower.openmetrics.health**

Returns `CRITICAL` if the Agent is unable to connect to the Celery OpenMetrics endpoint, otherwise returns `OK`.

*Statuses: ok, critical*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
