[Yandex Cloud documentation](../../index.md) > [Yandex Managed Service for Apache Airflow™](../index.md) > [Step-by-step guides](index.md) > Logs and monitoring > Cluster state monitoring

# Managed Service for Apache Airflow™ cluster state monitoring

Data on the cluster and host state is available in the [management console](https://console.yandex.cloud). You can view them on the **Monitoring** tab of the cluster management page or in [Yandex Monitoring](../../monitoring/concepts/index.md).

Diagnostic information about cluster states is presented as graphs.

Charts are updated once a minute.

{% note info %}

The most appropriate multiple units (MB, GB, and more) are automatically used in charts.

{% endnote %}

You can [configure alerts](#monitoring-integration) in Yandex Monitoring to receive notifications about cluster failures. In Yandex Monitoring, there are two alert thresholds: `Warning` and `Alarm`. If the specified threshold is exceeded, you will receive alerts via the configured [notification channels](../../monitoring/concepts/alerting.md#notification-channel).

## Cluster state monitoring {#monitoring-cluster}

To view detailed information on the health state of a Managed Service for Apache Airflow™ cluster:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), navigate to the relevant folder.
  1. Navigate to **Managed Service for&nbsp;Apache&nbsp;Airflow™**.
  1. Click the name of your cluster and select the **Monitoring** tab.

      The page that opens will display the performance charts for the Managed Service for Apache Airflow™ cluster.

  1. To get started with Yandex Monitoring metrics, dashboards, or alerts, click **Open in Monium** in the top panel.

{% endlist %}

### Available charts {#monitoring-dashboards}

* Under **Cluster**:

  * **CPU usage**: CPU usage by cluster components as a percentage of their limits.
  * **Memory usage**: RAM usage by cluster components as a percentage of their limits.
  * **Components Restarts**: Number of cluster component restarts.
  * **Components Count**: Number of active components in the cluster.

* Under **DAGs**:

  * **DAG import stats**: DAG import metrics.
  * **DAG parse timings**: Maximum time for processing DAGs.
  
* Under **Tasks**:

  * **Tasks completed, 5m window**: Number of tasks completed within a five-minute window.
  * **Tasks duration, p99**: 99th percentile of task execution time.
  * **Tasks duration sum, 5m window**: Total time it takes to complete tasks with a five-minute window.
  
* Under **Resources**:

  * **Pool usage**: Number of occupied slots per cluster pool.

## Setting up alerts in Yandex Monitoring {#monitoring-integration}

To configure [cluster](#monitoring-cluster) state indicator alerts:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder with the cluster for which you want to set up alerts.
  1. Navigate to ![image](../../_assets/console-icons/display-pulse.svg) **Monitoring**.
  1. Under **Service dashboards**, select **Managed Service for Apache Airflow™ — Cluster Overview**.
  1. In the chart you need, click ![options](../../_assets/console-icons/ellipsis.svg) and select **Create alert**.
  1. If the chart displays multiple metrics, select the data query for the relevant metric and click **Continue**. You can learn more about the query language in [this Yandex Monitoring article](../../monitoring/concepts/querying.md).
  1. Set the `Alarm` and `Warning` threshold values to trigger the alert.
  1. Click **Create alert**.

{% endlist %}

To have other cluster health indicators monitored automatically:

{% list tabs group=instructions %}

- Management console {#console}

    1. [Create an alert](../../monitoring/operations/alert/create-alert.md).
    1. Add a status metric.
    1. In the alert parameters, set the alert thresholds.

{% endlist %}

For a full list of supported metrics, see [this Monitoring guide](../../monitoring/metrics-ref/managed-airflow-ref.md).

## Cluster state and status

The **State** of a cluster shows the health of its hosts, while the **Status** shows whether the cluster is started, stopped, or is at an intermediate stage.

To view the health state and status of a cluster:

1. Open the [folder dashboard](https://console.yandex.cloud).
1. Navigate to **Managed Service for&nbsp;Apache&nbsp;Airflow™**.
1. In the cluster row, hover over the indicator in the **Availability** column.

### Cluster health states {#cluster-health}

State | Description | Suggested actions
:--- | :--- | :---
**ALIVE** | The cluster is operating normally. | No action is required.
**DEAD** | The cluster is out of order. | [Contact support](https://center.yandex.cloud/support) and specify the following:<ul><li>Cluster ID.</li><li>IDs of the last operations performed on it.</li><li>Time when the cluster entered the `DEAD` state according to [availability charts](#monitoring-cluster).</li></ul>
**UNKNOWN** | The cluster’s state is unknown. | [Contact support](https://center.yandex.cloud/support) and specify the following:<ul><li>Cluster ID.</li><li>IDs of the last operations performed on it.</li><li>Time when the cluster entered the `UNKNOWN` state according to [availability charts](#monitoring-cluster).</li></ul>

### Cluster statuses {#cluster-status}

Status | Description | Suggested actions
:--- | :--- | :---
**CREATING** | Preparing for the first start | Wait a while and get started. The time it takes to create a cluster depends on the host class.
**RUNNING** | The cluster is operating normally | No action is required.
**STOPPING** | The cluster is stopping | After a while, the cluster status will switch to `STOPPED` and the cluster will be disabled. No action is required.
**STOPPED** | The cluster is stopped | Start the cluster to get it running again.
**STARTING** | Starting the cluster that was stopped earlier | After a while, the cluster status will switch to `RUNNING`. Wait a while and get started.
**UPDATING** | Updating the cluster's configuration | Once the update is complete, the cluster will get the status it had prior to the update: `RUNNING` or `STOPPED`.
**ERROR** | Error when performing an operation with the cluster or during a maintenance window | If the cluster remains in this status for a long time, [contact support](https://center.yandex.cloud/support). You can see whether a cluster is available by its status.
**STATUS_UNKNOWN** | The cluster is unable to determine its status | If the cluster remains in this status for a long time, [contact support](https://center.yandex.cloud/support).