# Alerts

Alerts are one example of a supported entity type, a component of the Coralogix infrastructure capable of sending notifications.

## Supported entity subtypes

An entity subtype adds a layer of granularity to an entity type. For Alerts, an entity subtype consists of three elements: an alert type, a condition, and status.

The following entity subtypes for Alerts are supported:

| Source  | Type                           | Condition                                                         | Status               | Description                                                                                                                                                                         |
| ------- | ------------------------------ | ----------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Logs    | `LOGS_IMMEDIATE`               | —                                                                 | Triggered / Resolved | Alert immediately when a log of interest is detected. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/logs/immediate-notifications/)                         |
| Logs    | `LOGS_THRESHOLD`               | More than / Less than                                             | Triggered / Resolved | Alert when the sum of logs crosses a predefined threshold. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/logs/threshold-alerts/)                           |
| Logs    | `LOGS_RATIO_THRESHOLD`         | More than / Less than                                             | Triggered / Resolved | Alert when the ratio between two log queries reaches a set threshold. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/logs/ratio-alerts/)                    |
| Logs    | `LOGS_TIME_RELATIVE_THRESHOLD` | More than / Less than                                             | Triggered / Resolved | Alerts when a fixed ratio reaches a set threshold compared to a past time frame. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/logs/time-relative-alerts/) |
| Logs    | `LOGS_ANOMALY`                 | More than usual                                                   | Triggered / Resolved | Alert when a log crosses an AI-generated baseline. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/logs/anomaly-detection-alerts/)                           |
| Logs    | `LOGS_NEW_VALUE`               | —                                                                 | Triggered            | Alert on a newly detected value in a time series. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/logs/new-value-alerts/)                                    |
| Logs    | `LOGS_UNIQUE_COUNT`            | More than                                                         | Triggered            | Alert based on a unique value count per key. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/logs/unique-count-alerts/)                                      |
| Metrics | `METRIC_THRESHOLD`             | More than / Less than / More than or equals / Less than or equals | Triggered / Resolved | Alert when a metric crosses a predefined threshold. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/metrics/threshold-alerts/)                               |
| Metrics | `METRIC_ANOMALY`               | More than usual / Less than usual/                                | Triggered /Resolved  | Alert when a metric crosses an AI-generated baseline. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/metrics/anomaly-detection-alerts/)                     |
| Tracing | `TRACING_IMMEDIATE`            | —                                                                 | Triggered            | Alert immediately when span duration exceeds a set latency. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/traces/tracing-alerts/)                          |
| Tracing | `TRACING_THRESHOLD`            | More than                                                         | Triggered            | Alert when trace latency crosses a predefined threshold. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/traces/tracing-alerts/)                             |
| Flow    | `FLOW`                         | —                                                                 | Triggered / Resolved | Alert when any combination of alerts occur in a specific sequence within a defined timeframe. [Docs](https://coralogix.com/docs/user-guides/alerting/create-an-alert/flow-alerts/)  |

All supported entity subtypes, consisting of `EntityType` and `EntitySubType`, can be found in the [Alerts API](https://docs.coralogix.com/api-reference/v5/alert-definitions-service/overview).

## Alerts schema

### General reference

The full schema for Alerts is available in the [Alerts history reference](https://coralogix.com/docs/user-guides/data-layer/system_dataspace/alerts-history/index.md).

### Context reference

All templates have access to the `_context` variable, which contains metadata about the notification source type, including system identifiers and trigger details. This context allows you to dynamically customize your template content based on the notification origin.

See [Dynamic templating](https://coralogix.com/docs/user-guides/notification-center/dynamic-templating/#global-context-available) for details.

## Next steps

\[Alerting overview\](https://coralogix.com/docs/user-guides/notification-center/entity-types/alerts/{{ config.site_url }}user-guides/alerting/introduction-to-alerts/index.md) \[Alert routing labels\](https://coralogix.com/docs/user-guides/notification-center/entity-types/alerts/{{ config.site_url }}user-guides/notification-center/routing/labels-to-alerts/index.md) \[Routing rules\](https://coralogix.com/docs/user-guides/notification-center/entity-types/alerts/{{ config.site_url }}user-guides/notification-center/routing/define-routing-rule/index.md)
