[Yandex Cloud documentation](../../index.md) > [Yandex Certificate Manager](../index.md) > [Step-by-step guides](index.md) > Adding an alert for a certificate

# Adding an alert for a certificate

You can add alerts for certificate expiration or invalid certificate events.

## Adding an alert about upcoming certificate expiration {#expired}

To create an alert:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) for your alert.
  1. Navigate to **Monitoring**.
  1. On the home page, click **Create alert** under **Features**.
  1. Under **Basic information**, specify the main alert parameters:
     * **Name**. Name the channel.
     * **Type**. Specify the notification method.
  1. Set the alert trigger conditions:
     1. Under **Metrics**, select the metric to base the alert on:
        * `service = Certificate Manager`.
        * `name = certificate.days_until_expiration`.
        * `certificate = *`. To monitor a specific certificate, specify its ID.
        * Optionally, if you choose more than one certificate, use the `series_min()` function that selects the minimum value.
     1. Under **Alert conditions**, configure the main and additional alert settings:
        * **Aggregation function**.
        * **Comparison function**. The condition is **Less than or equals**. The number of days for **Warning** is `14`; for **Alarm**, `4`. 
        * **Evaluation window**.

        
        For more information, see [Alert triggers](../../monitoring/concepts/alerting/alert.md#condition).


     1. Specify the notification channel. If you do not have a notification channel, [create one](../../monitoring/operations/alert/create-channel.md).
     1. Click **Create**. The alert will appear in the list.

{% endlist %}

## Adding an alert about an invalid certificate {#inoperable}

To create an alert:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder for the alert.
  1. Navigate to **Monitoring**.
  1. On the home page, click **Create alert** under **Features**.
  1. Under **Basic information**, specify the main alert parameters:
     * **Name**. Name the channel.
     * **Type**. Specify the notification method.
  1. Set the alert trigger conditions:
     1. Under **Metrics**, select the metric to base the alert on:
        * `service = Certificate Manager`.
        * `name = certificate.is_out_of_order`.
        * `certificate = *`. To monitor a specific certificate, specify its ID.
        * Optionally, if you choose more than one certificate, use the `series_sum()` summing function.
     1. Under **Alert conditions**, configure the main and additional alert settings:
        * **Aggregation function**.
        * **Comparison function**. The condition is **Greater than**. The number of invalid certificates for **Alarm** is `0`.
        * **Evaluation window**.

        
        For more information, see [Alert triggers](../../monitoring/concepts/alerting/alert.md#condition). 


     1. Specify the notification channel. If you do not have a notification channel, [create one](../../monitoring/operations/alert/create-channel.md).
     1. Click **Create**. The alert will appear in the list.

{% endlist %}