Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fnotification-center%2Fentity-types%2Falerts.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fnotification-center%2Fentity-types%2Falerts.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# Alerts

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

## Supported entity subtypes[​](#supported-entity-subtypes "Direct link to 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`               | N/A                                                               | Triggered / Resolved | Alert immediately when a log of interest is detected. [Docs](https://coralogix.com/docs/docs/user-guides/alerting/create-an-alert/logs/immediate-notifications/.md)                         |
| Logs    | `LOGS_THRESHOLD`               | More than / Less than                                             | Triggered / Resolved | Alert when the sum of logs crosses a predefined threshold. [Docs](https://coralogix.com/docs/docs/user-guides/alerting/create-an-alert/logs/threshold-alerts/.md)                           |
| 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/docs/user-guides/alerting/create-an-alert/logs/ratio-alerts/.md)                    |
| 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/docs/user-guides/alerting/create-an-alert/logs/time-relative-alerts/.md) |
| Logs    | `LOGS_ANOMALY`                 | More than usual                                                   | Triggered / Resolved | Alert when a log crosses an AI-generated baseline. [Docs](https://coralogix.com/docs/docs/user-guides/alerting/create-an-alert/logs/anomaly-detection-alerts/.md)                           |
| Logs    | `LOGS_NEW_VALUE`               | N/A                                                               | Triggered            | Alert on a newly detected value in a time series. [Docs](https://coralogix.com/docs/docs/user-guides/alerting/create-an-alert/logs/new-value-alerts/.md)                                    |
| Logs    | `LOGS_UNIQUE_COUNT`            | More than                                                         | Triggered            | Alert based on a unique value count per key. [Docs](https://coralogix.com/docs/docs/user-guides/alerting/create-an-alert/logs/unique-count-alerts/.md)                                      |
| 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/docs/user-guides/alerting/create-an-alert/metrics/threshold-alerts/.md)                               |
| 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/docs/user-guides/alerting/create-an-alert/metrics/anomaly-detection-alerts/.md)                     |
| Tracing | `TRACING_IMMEDIATE`            | N/A                                                               | Triggered            | Alert immediately when span duration exceeds a set latency. [Docs](https://coralogix.com/docs/docs/user-guides/alerting/create-an-alert/traces/tracing-alerts/.md)                          |
| Tracing | `TRACING_THRESHOLD`            | More than                                                         | Triggered            | Alert when trace latency crosses a predefined threshold. [Docs](https://coralogix.com/docs/docs/user-guides/alerting/create-an-alert/traces/tracing-alerts/.md)                             |
| Flow    | `FLOW`                         | N/A                                                               | Triggered / Resolved | Alert when any combination of alerts occur in a specific sequence within a defined timeframe. [Docs](https://coralogix.com/docs/docs/user-guides/alerting/create-an-alert/flow-alerts/.md)  |

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

## Alerts schema[​](#alerts-schema "Direct link to Alerts schema")

### General reference[​](#general-reference "Direct link to General reference")

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

### Context reference[​](#context-reference "Direct link to 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/docs/user-guides/notification-center/dynamic-templating/.md#global-context-available) for details.

### Timestamps in templates[​](#timestamps-in-templates "Direct link to Timestamps in templates")

The alert object exposes a single trigger timestamp, not per-group start and end times. When you loop over `alert.groups` in a custom preset, each group does not carry its own `startTime` or `endTime`.

To show when an alert last triggered for each group, use `last_triggered_timestamp` (from the API), falling back to `alert.timestamp` (from the alert object):

```
{% for g in alert.groups %}

{

  "type": "section",

  "text": {

    "type": "mrkdwn",

    "text": "Last triggered: {{ g.last_triggered_timestamp or alert.timestamp | date(format='%Y-%m-%d %H:%M') }}"

  }

}

{% endfor %}
```

For the full list of available fields, see the [Alerts history reference](https://coralogix.com/docs/docs/user-guides/data-layer/system_dataspace/alerts-history/.md).

## Next steps[​](#next-steps "Direct link to Next steps")

[Alerting overview](https://coralogix.com/docs/docs/user-guides/alerting/introduction-to-alerts/.md)[Alert routing labels](https://coralogix.com/docs/docs/user-guides/notification-center/routing/labels-to-alerts/.md)[Routing rules](https://coralogix.com/docs/docs/user-guides/notification-center/routing/define-routing-rule/.md)
