# <a id="bitdrift.public.unary.alerts.v1.BasicAlertConfig"></a>BasicAlertConfig

**Source definition:** [`src/bitdrift/public/unary/alerts/v1/alerts.proto#L27-L58`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/alerts/v1/alerts.proto#L27-L58>)

An alert definition global for an individual metric aggregated ID. This is shared across N
 workflows/charts if all of those workflows/charts refer to the same aggregated ID.

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| threshold | <span class="proto-type proto-type-primitive">double</span> | The threshold value for the alert that will cause the alert to trigger. |
| condition | <span class="proto-type proto-type-enum">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">alerts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">ThresholdCondition</i>](bitdrift_public_unary_alerts_v1_ThresholdCondition.md "bitdrift.public.unary.alerts.v1.ThresholdCondition")</span><br><em class="proto-field-annotation">must be a defined enum value</em> | The condition that the threshold must meet for the alert to trigger. |
| window | <span class="proto-type proto-type-well-known">[google.protobuf.Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration "google.protobuf.Duration")</span> | The window over which the alert will be evaluated. Currently supported windows include: 5  minutes, 1 hour, and 1 day. Regardless of the window, alerts are currently evaluated every 5  minutes. |
| consecutive_data_points | <span class="proto-type proto-type-primitive">optional uint32</span> | The number of consecutive data points that must meet the threshold condition for the alert to  trigger. The aggregation window of each point depends on the evaluation window. For 5 minute  and 1 hour evaluation windows, the aggregation window is 1 minute. For the 24 hour evaluation  window, the aggregation window is 15 minutes. If not set defaults to 1. |
| histogram_configuration | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">charts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">HistogramConfiguration</i>](bitdrift_public_unary_charts_v1_HistogramConfiguration.md "bitdrift.public.unary.charts.v1.HistogramConfiguration")</span> | Configuration for any histogram values within the aggregate ID. This is required if the  aggregate ID refers to a histogram so that one or more percentiles can be used as part of the  alert condition. |
| limit_strategy | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">charts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">LimitStrategy</i>](bitdrift_public_unary_charts_v1_LimitStrategy.md "bitdrift.public.unary.charts.v1.LimitStrategy")</span> | Optional limit strategy to use for this alert. If this is omitted, a default value of limiting  by a top k of 5 entries is used. Ultimately this will allow alerting on specific dimensions  for a group by aggregate ID if desired. |
| unique_device_threshold | <span class="proto-type proto-type-primitive">optional uint32</span> | If specified, the alert will only trigger if at least this many unique devices are present in  each consecutive data point that breaches the threshold condition. |

</section>
<p class="h4">Example</p>
```json
{
  "condition": "ABOVE",
  "consecutive_data_points": 3,
  "histogram_configuration": {
    "percentile": 1.0,
    "percentiles": [
      1.0
    ]
  },
  "limit_strategy": {
    "exclusions": {
      "dimension_identifiers": [
        {
          "id": "time_series_id_opaque_example",
          "labels": [
            {
              "name": "name",
              "value": "value"
            }
          ]
        }
      ],
      "return_other": false
    },
    "sort_order": "MAX",
    "top_k_limit": {
      "top_k": 5
    }
  },
  "threshold": 0.75,
  "unique_device_threshold": 50,
  "window": "3600s"
}
```

