---
title: Define custom metrics for an alert condition
source: https://docs.newrelic.com/docs/alerts/create-alert/examples/define-custom-metrics-alert-condition
---

To alert on custom metrics, follow standard procedures to [add a condition](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-alert-conditions) to a policy. The condition's [thresholds](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/advanced-techniques/set-thresholds-alert-condition) section includes **Custom Metrics**, which you can select from the list.

## Requirements for custom metrics [#custom-metrics-requirements]

Use the policy's **Thresholds** section to define the custom metric values. These include:

-   The custom metric name for the selected product category and [targets](https://docs.newrelic.com/docs/new-relic-solutions/get-started/glossary/#alert-target).
-   Selected threshold value function of either average, minimum, maximum, total value per minute, or throughput.
-   Selected threshold level of either above, below, or equal to.
-   Critical and warning threshold value and duration that will open an alert event, such as `5 units for at least 5 minutes`.
-   Condition name (required) for the custom metric.

## Create a custom metric condition [#custom-metrics-threshold]

/\*  \*/

To define the custom metric values for your condition:

1.  From **one.newrelic.com**, select [**Alerts**](https://one.newrelic.com/alerts-ai), then [**Alert policies**](https://one.newrelic.com/alerts-ai/condition-builder/policy-list).
2.  Click on the policy you'd like to create the classic alert condition, or create a new policy.
3.  Select **New alert condition**, then select **Build a classic alert**.
4.  From the **Categorize** section, select the [product and type of condition](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-alert-conditions) for the custom metric.
5.  From the **Select entities** section, add one or more [targets (entities)](https://docs.newrelic.com/docs/new-relic-solutions/get-started/glossary/#alert-target) that use your custom metric.
6.  From the **Set thresholds** section, select one of the metrics from the **Custom Metrics** section in the Select drop down.
7.  Provide the [required threshold values](#custom-metrics-requirements) for your custom metric.

After you name your custom metric condition, you can choose to include the [URL with runbook instructions](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/understand-technical-concepts/provide-runbook-instructions-alert-activity) for handling certain situations.

Repeat these steps as necessary to create additional conditions for custom metrics.

## View or update custom metric conditions [#viewing-updating-custom]

After you save the condition, you can view and update the condition from the relevant policy's condition list page.

1.  From **one.newrelic.com**, select [**Alerts**](https://one.newrelic.com/alerts-ai), then [**Alert policies**](https://one.newrelic.com/alerts-ai/condition-builder/policy-list).
2.  Click on the policy in which your alert was created.
3.  Click on the custom metric condition's name. This will open the condition overview page.
4.  To edit your custom metric, click the **Edit** button.
