> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coralogix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

# Alert definitions service overview

View and manage your alerts using alert definitions - data structures that contain the configuration required to create an alert.

Learn more about alerts in our [documentation](https://coralogix.com/docs/user-guides/alerting/introduction-to-alerts/).

## Authentication and permissions

To use the Alert definitions service API you need to [create a personal or team API key](https://coralogix.com/docs/user-guides/account-management/api-keys/api-keys/). It's recommended to use permission presets, as they are automatically updated with all relevant permissions. Alternatively, you can manually add the following individual permissions.

| Presets | Permission            | Description                                  |
| ------- | --------------------- | -------------------------------------------- |
| Alerts  | `alerts:ReadConfig`   | Grants access to read alerts                 |
|         | `alerts:UpdateConfig` | Required to create, update, or delete alerts |

## Common error response codes

| Status Code                 | Description       |
| --------------------------- | ----------------- |
| `400 Bad Request`           | Response code 400 |
| `401 Unauthorized`          | Response code 401 |
| `500 Internal Server Error` | Response code 500 |

## Protocol documentation

### AlertDef

Represents An Existing or Created Alert Definition

| Field                  | Type                        | Label | Description                                                                                      |
| ---------------------- | --------------------------- | ----- | ------------------------------------------------------------------------------------------------ |
| alert\_def\_properties | AlertDefProperties          |       |                                                                                                  |
| id                     | google.protobuf.StringValue |       | This is the Alert Definition's Persistent ID (does not change on replace) , AKA UniqueIDentifier |
| alert\_version\_id     | google.protobuf.StringValue |       | the old alertID                                                                                  |
| created\_time          | google.protobuf.Timestamp   |       |                                                                                                  |
| updated\_time          | google.protobuf.Timestamp   |       |                                                                                                  |

### AlertDefProperties

Represents The non generated alert definition properties (the ones that are set by the user)

| Field                           | Type                                 | Label    | Description |
| ------------------------------- | ------------------------------------ | -------- | ----------- |
| name                            | google.protobuf.StringValue          |          |             |
| description                     | google.protobuf.StringValue          |          |             |
| enabled                         | google.protobuf.BoolValue            |          |             |
| priority                        | AlertDefPriority                     |          |             |
| active\_on                      | ActivitySchedule                     |          |             |
| type                            | AlertDefType                         |          |             |
| logs\_immediate                 | LogsImmediateType                    |          |             |
| tracing\_immediate              | TracingImmediateType                 |          |             |
| logs\_threshold                 | LogsThresholdType                    |          |             |
| logs\_ratio\_threshold          | LogsRatioThresholdType               |          |             |
| logs\_time\_relative\_threshold | LogsTimeRelativeThresholdType        |          |             |
| metric\_threshold               | MetricThresholdType                  |          |             |
| tracing\_threshold              | TracingThresholdType                 |          |             |
| flow                            | FlowType                             |          |             |
| logs\_anomaly                   | LogsAnomalyType                      |          |             |
| metric\_anomaly                 | MetricAnomalyType                    |          |             |
| logs\_new\_value                | LogsNewValueType                     |          |             |
| logs\_unique\_count             | LogsUniqueCountType                  |          |             |
| group\_by\_keys                 | google.protobuf.StringValue          | repeated |             |
| incidents\_settings             | AlertDefIncidentSettings             |          |             |
| notification\_group             | AlertDefNotificationGroup            |          |             |
| entity\_labels                  | AlertDefProperties.EntityLabelsEntry | repeated |             |
| phantom\_mode                   | google.protobuf.BoolValue            |          |             |
| deleted                         | google.protobuf.BoolValue            |          |             |

### AlertDefProperties.EntityLabelsEntry

| Field | Type   | Label | Description |
| ----- | ------ | ----- | ----------- |
| key   | string |       |             |
| value | string |       |             |

### AlertDefIncidentSettings

| Field      | Type                        | Label | Description |
| ---------- | --------------------------- | ----- | ----------- |
| minutes    | google.protobuf.UInt32Value |       |             |
| notify\_on | NotifyOn                    |       |             |

### AlertDefNotificationGroup

| Field           | Type                        | Label    | Description |
| --------------- | --------------------------- | -------- | ----------- |
| group\_by\_keys | google.protobuf.StringValue | repeated |             |
| webhooks        | AlertDefWebhooksSettings    | repeated |             |

### AlertDefWebhooksSettings

| Field       | Type                        | Label    | Description |
| ----------- | --------------------------- | -------- | ----------- |
| minutes     | google.protobuf.UInt32Value |          |             |
| notify\_on  | NotifyOn                    | optional |             |
| integration | IntegrationType             |          |             |

### IntegrationType

| Field           | Type                        | Label | Description |
| --------------- | --------------------------- | ----- | ----------- |
| integration\_id | google.protobuf.UInt32Value |       |             |
| recipients      | Recipients                  |       |             |

### Recipients

| Field  | Type                        | Label    | Description |
| ------ | --------------------------- | -------- | ----------- |
| emails | google.protobuf.StringValue | repeated |             |

### NotifyOn

| Name                                     | Number | Description |
| ---------------------------------------- | ------ | ----------- |
| NOTIFY\_ON\_TRIGGERED\_ONLY\_UNSPECIFIED | 0      |             |
| NOTIFY\_ON\_TRIGGERED\_AND\_RESOLVED     | 1      |             |

### AlertDefPriority

| Name                                      | Number | Description |
| ----------------------------------------- | ------ | ----------- |
| ALERT\_DEF\_PRIORITY\_P5\_OR\_UNSPECIFIED | 0      |             |
| ALERT\_DEF\_PRIORITY\_P4                  | 1      |             |
| ALERT\_DEF\_PRIORITY\_P3                  | 2      |             |
| ALERT\_DEF\_PRIORITY\_P2                  | 3      |             |
| ALERT\_DEF\_PRIORITY\_P1                  | 4      |             |

### ActivitySchedule

| Field         | Type      | Label    | Description |
| ------------- | --------- | -------- | ----------- |
| day\_of\_week | DayOfWeek | repeated |             |
| start\_time   | TimeOfDay |          |             |
| end\_time     | TimeOfDay |          |             |

### TimeOfDay

| Field   | Type  | Label | Description                                             |
| ------- | ----- | ----- | ------------------------------------------------------- |
| hours   | int32 |       | Hours of day in 24 hour format. Should be from 0 to 23. |
| minutes | int32 |       | Minutes of hour of day. Must be from 0 to 59.           |

### DayOfWeek

| Name                                   | Number | Description |
| -------------------------------------- | ------ | ----------- |
| DAY\_OF\_WEEK\_MONDAY\_OR\_UNSPECIFIED | 0      |             |
| DAY\_OF\_WEEK\_TUESDAY                 | 1      |             |
| DAY\_OF\_WEEK\_WEDNESDAY               | 2      |             |
| DAY\_OF\_WEEK\_THURSDAY                | 3      |             |
| DAY\_OF\_WEEK\_FRIDAY                  | 4      |             |
| DAY\_OF\_WEEK\_SATURDAY                | 5      |             |
| DAY\_OF\_WEEK\_SUNDAY                  | 6      |             |

### AlertDefType

| Name                                               | Number | Description |
| -------------------------------------------------- | ------ | ----------- |
| ALERT\_DEF\_TYPE\_LOGS\_IMMEDIATE\_OR\_UNSPECIFIED | 0      |             |
| ALERT\_DEF\_TYPE\_LOGS\_THRESHOLD                  | 1      |             |
| ALERT\_DEF\_TYPE\_LOGS\_ANOMALY                    | 3      |             |
| ALERT\_DEF\_TYPE\_LOGS\_RATIO\_THRESHOLD           | 4      |             |
| ALERT\_DEF\_TYPE\_LOGS\_NEW\_VALUE                 | 6      |             |
| ALERT\_DEF\_TYPE\_LOGS\_UNIQUE\_COUNT              | 7      |             |
| ALERT\_DEF\_TYPE\_LOGS\_TIME\_RELATIVE\_THRESHOLD  | 8      |             |
| ALERT\_DEF\_TYPE\_METRIC\_THRESHOLD                | 10     |             |
| ALERT\_DEF\_TYPE\_METRIC\_ANOMALY                  | 14     |             |
| ALERT\_DEF\_TYPE\_TRACING\_IMMEDIATE               | 15     |             |
| ALERT\_DEF\_TYPE\_TRACING\_THRESHOLD               | 16     |             |
| ALERT\_DEF\_TYPE\_FLOW                             | 17     |             |

### ActivityAnalysis

| Field  | Type                   | Label    | Description |
| ------ | ---------------------- | -------- | ----------- |
| rules  | string                 | repeated |             |
| status | ActivityAnalysisStatus |          |             |

### ActivityAnalysisStatus

| Name                                                  | Number | Description |
| ----------------------------------------------------- | ------ | ----------- |
| ACTIVITY\_ANALYSIS\_STATUS\_ACTIVATE\_OR\_UNSPECIFIED | 0      |             |
| ACTIVITY\_ANALYSIS\_STATUS\_MUTE                      | 1      |             |

### FlowStages

| Field                | Type                       | Label | Description |
| -------------------- | -------------------------- | ----- | ----------- |
| flow\_stages\_groups | FlowStagesGroups           |       |             |
| timeframe\_ms        | google.protobuf.Int64Value |       |             |
| timeframe\_type      | TimeframeType              |       |             |

### FlowStagesGroup

| Field       | Type                      | Label    | Description |
| ----------- | ------------------------- | -------- | ----------- |
| alert\_defs | FlowStagesGroupsAlertDefs | repeated |             |
| next\_op    | NextOp                    |          |             |
| alerts\_op  | AlertsOp                  |          |             |

### FlowStagesGroups

| Field  | Type            | Label    | Description |
| ------ | --------------- | -------- | ----------- |
| groups | FlowStagesGroup | repeated |             |

### FlowStagesGroupsAlertDefs

| Field | Type                        | Label | Description |
| ----- | --------------------------- | ----- | ----------- |
| id    | google.protobuf.StringValue |       |             |
| not   | google.protobuf.BoolValue   |       |             |

### FlowType

| Field                | Type                      | Label    | Description |
| -------------------- | ------------------------- | -------- | ----------- |
| stages               | FlowStages                | repeated |             |
| enforce\_suppression | google.protobuf.BoolValue |          |             |

### AlertsOp

| Name                             | Number | Description |
| -------------------------------- | ------ | ----------- |
| ALERTS\_OP\_AND\_OR\_UNSPECIFIED | 0      |             |
| ALERTS\_OP\_OR                   | 1      |             |

### NextOp

| Name                           | Number | Description |
| ------------------------------ | ------ | ----------- |
| NEXT\_OP\_AND\_OR\_UNSPECIFIED | 0      |             |
| NEXT\_OP\_OR                   | 1      |             |

### TimeframeType

| Name                         | Number | Description |
| ---------------------------- | ------ | ----------- |
| TIMEFRAME\_TYPE\_UNSPECIFIED | 0      |             |
| TIMEFRAME\_TYPE\_UP\_TO      | 1      |             |

### LogsAnomalyConditionType

| Name                                                               | Number | Description |
| ------------------------------------------------------------------ | ------ | ----------- |
| LOGS\_ANOMALY\_CONDITION\_TYPE\_MORE\_THAN\_USUAL\_OR\_UNSPECIFIED | 0      |             |

### LabelFilterType

| Field     | Type                        | Label | Description |
| --------- | --------------------------- | ----- | ----------- |
| value     | google.protobuf.StringValue |       |             |
| operation | LogFilterOperationType      |       |             |

### LabelFilters

| Field             | Type            | Label    | Description |
| ----------------- | --------------- | -------- | ----------- |
| application\_name | LabelFilterType | repeated |             |
| subsystem\_name   | LabelFilterType | repeated |             |
| severities        | LogSeverity     | repeated |             |

### LogsFilter

| Field          | Type             | Label | Description |
| -------------- | ---------------- | ----- | ----------- |
| simple\_filter | LogsSimpleFilter |       |             |

### LogsSimpleFilter

| Field          | Type                        | Label | Description |
| -------------- | --------------------------- | ----- | ----------- |
| lucene\_query  | google.protobuf.StringValue |       |             |
| label\_filters | LabelFilters                |       |             |

### LogFilterOperationType

| Name                                              | Number | Description |
| ------------------------------------------------- | ------ | ----------- |
| LOG\_FILTER\_OPERATION\_TYPE\_IS\_OR\_UNSPECIFIED | 0      |             |
| LOG\_FILTER\_OPERATION\_TYPE\_INCLUDES            | 1      |             |
| LOG\_FILTER\_OPERATION\_TYPE\_ENDS\_WITH          | 2      |             |
| LOG\_FILTER\_OPERATION\_TYPE\_STARTS\_WITH        | 3      |             |

### LogSeverity

| Name                                | Number | Description |
| ----------------------------------- | ------ | ----------- |
| LOG\_SEVERITY\_VERBOSE\_UNSPECIFIED | 0      |             |
| LOG\_SEVERITY\_DEBUG                | 1      |             |
| LOG\_SEVERITY\_INFO                 | 2      |             |
| LOG\_SEVERITY\_WARNING              | 3      |             |
| LOG\_SEVERITY\_ERROR                | 4      |             |
| LOG\_SEVERITY\_CRITICAL             | 5      |             |

### LogsTimeWindow

| Field                               | Type                | Label | Description |
| ----------------------------------- | ------------------- | ----- | ----------- |
| logs\_time\_window\_specific\_value | LogsTimeWindowValue |       |             |

### LogsTimeWindowValue

| Name                                                   | Number | Description |
| ------------------------------------------------------ | ------ | ----------- |
| LOGS\_TIME\_WINDOW\_VALUE\_MINUTES\_5\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_MINUTES\_10                 | 1      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_MINUTES\_20                 | 2      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_MINUTES\_15                 | 3      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_MINUTES\_30                 | 4      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_HOUR\_1                     | 5      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_HOURS\_2                    | 6      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_HOURS\_4                    | 7      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_HOURS\_6                    | 8      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_HOURS\_12                   | 9      |             |
| LOGS\_TIME\_WINDOW\_VALUE\_HOURS\_24                   | 10     |             |
| LOGS\_TIME\_WINDOW\_VALUE\_HOURS\_36                   | 11     |             |

### LogsAnomalyCondition

| Field              | Type                        | Label | Description |
| ------------------ | --------------------------- | ----- | ----------- |
| minimum\_threshold | google.protobuf.DoubleValue |       |             |
| time\_window       | LogsTimeWindow              |       |             |
| condition\_type    | LogsAnomalyConditionType    |       |             |

### LogsAnomalyRule

| Field     | Type                 | Label | Description |
| --------- | -------------------- | ----- | ----------- |
| condition | LogsAnomalyCondition |       |             |

### LogsAnomalyType

| Field                         | Type                        | Label    | Description |
| ----------------------------- | --------------------------- | -------- | ----------- |
| logs\_filter                  | LogsFilter                  |          |             |
| rules                         | LogsAnomalyRule             | repeated |             |
| notification\_payload\_filter | google.protobuf.StringValue | repeated |             |

### LogsImmediateType

| Field                         | Type                        | Label    | Description |
| ----------------------------- | --------------------------- | -------- | ----------- |
| logs\_filter                  | LogsFilter                  |          |             |
| notification\_payload\_filter | google.protobuf.StringValue | repeated |             |

### LogsNewValueCondition

| Field              | Type                        | Label | Description |
| ------------------ | --------------------------- | ----- | ----------- |
| keypath\_to\_track | google.protobuf.StringValue |       |             |
| time\_window       | LogsNewValueTimeWindow      |       |             |

### LogsNewValueRule

| Field     | Type                  | Label | Description |
| --------- | --------------------- | ----- | ----------- |
| condition | LogsNewValueCondition |       |             |

### LogsNewValueType

| Field                         | Type                        | Label    | Description |
| ----------------------------- | --------------------------- | -------- | ----------- |
| logs\_filter                  | LogsFilter                  |          |             |
| rules                         | LogsNewValueRule            | repeated |             |
| notification\_payload\_filter | google.protobuf.StringValue | repeated |             |

### LogsRatioCondition

| Field           | Type                        | Label | Description |
| --------------- | --------------------------- | ----- | ----------- |
| threshold       | google.protobuf.DoubleValue |       |             |
| time\_window    | LogsRatioTimeWindow         |       |             |
| condition\_type | LogsRatioConditionType      |       |             |

### LogsRatioRules

| Field     | Type               | Label | Description |
| --------- | ------------------ | ----- | ----------- |
| condition | LogsRatioCondition |       |             |
| override  | AlertDefOverride   |       |             |

### LogsRatioThresholdType

| Field                          | Type                        | Label    | Description |
| ------------------------------ | --------------------------- | -------- | ----------- |
| numerator                      | LogsFilter                  |          |             |
| numerator\_alias               | google.protobuf.StringValue |          |             |
| denominator                    | LogsFilter                  |          |             |
| denominator\_alias             | google.protobuf.StringValue |          |             |
| rules                          | LogsRatioRules              | repeated |             |
| ignore\_infinity               | google.protobuf.BoolValue   |          |             |
| notification\_payload\_filter  | google.protobuf.StringValue | repeated |             |
| group\_by\_for                 | LogsRatioGroupByFor         |          |             |
| undetected\_values\_management | UndetectedValuesManagement  |          |             |

### LogsThresholdCondition

| Field           | Type                        | Label | Description |
| --------------- | --------------------------- | ----- | ----------- |
| threshold       | google.protobuf.DoubleValue |       |             |
| time\_window    | LogsTimeWindow              |       |             |
| condition\_type | LogsThresholdConditionType  |       |             |

### LogsThresholdRule

| Field     | Type                   | Label | Description |
| --------- | ---------------------- | ----- | ----------- |
| condition | LogsThresholdCondition |       |             |
| override  | AlertDefOverride       |       |             |

### LogsThresholdType

| Field                          | Type                        | Label    | Description |
| ------------------------------ | --------------------------- | -------- | ----------- |
| logs\_filter                   | LogsFilter                  |          |             |
| undetected\_values\_management | UndetectedValuesManagement  |          |             |
| rules                          | LogsThresholdRule           | repeated |             |
| notification\_payload\_filter  | google.protobuf.StringValue | repeated |             |

### LogsTimeRelativeCondition

| Field           | Type                          | Label | Description |
| --------------- | ----------------------------- | ----- | ----------- |
| threshold       | google.protobuf.DoubleValue   |       |             |
| compared\_to    | LogsTimeRelativeComparedTo    |       |             |
| condition\_type | LogsTimeRelativeConditionType |       |             |

### LogsTimeRelativeRule

| Field     | Type                      | Label | Description |
| --------- | ------------------------- | ----- | ----------- |
| condition | LogsTimeRelativeCondition |       |             |
| override  | AlertDefOverride          |       |             |

### LogsTimeRelativeThresholdType

| Field                          | Type                        | Label    | Description |
| ------------------------------ | --------------------------- | -------- | ----------- |
| logs\_filter                   | LogsFilter                  |          |             |
| rules                          | LogsTimeRelativeRule        | repeated |             |
| ignore\_infinity               | google.protobuf.BoolValue   |          |             |
| notification\_payload\_filter  | google.protobuf.StringValue | repeated |             |
| undetected\_values\_management | UndetectedValuesManagement  |          |             |

### LogsUniqueCountCondition

| Field              | Type                       | Label | Description |
| ------------------ | -------------------------- | ----- | ----------- |
| max\_unique\_count | google.protobuf.Int64Value |       |             |
| time\_window       | LogsUniqueValueTimeWindow  |       |             |

### LogsUniqueCountRule

| Field     | Type                     | Label | Description |
| --------- | ------------------------ | ----- | ----------- |
| condition | LogsUniqueCountCondition |       |             |

### LogsUniqueCountType

| Field                                   | Type                        | Label    | Description |
| --------------------------------------- | --------------------------- | -------- | ----------- |
| logs\_filter                            | LogsFilter                  |          |             |
| rules                                   | LogsUniqueCountRule         | repeated |             |
| notification\_payload\_filter           | google.protobuf.StringValue | repeated |             |
| max\_unique\_count\_per\_group\_by\_key | google.protobuf.Int64Value  |          |             |
| unique\_count\_keypath                  | google.protobuf.StringValue |          |             |

### LogsNewValueTimeWindow

| Field                                           | Type                        | Label | Description |
| ----------------------------------------------- | --------------------------- | ----- | ----------- |
| logs\_new\_value\_time\_window\_specific\_value | LogsNewValueTimeWindowValue |       |             |

### LogsNewValueTimeWindowValue

| Name                                                              | Number | Description |
| ----------------------------------------------------------------- | ------ | ----------- |
| LOGS\_NEW\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_12\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_NEW\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_24                  | 1      |             |
| LOGS\_NEW\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_48                  | 2      |             |
| LOGS\_NEW\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_72                  | 3      |             |
| LOGS\_NEW\_VALUE\_TIME\_WINDOW\_VALUE\_WEEK\_1                    | 4      |             |
| LOGS\_NEW\_VALUE\_TIME\_WINDOW\_VALUE\_MONTH\_1                   | 5      |             |
| LOGS\_NEW\_VALUE\_TIME\_WINDOW\_VALUE\_MONTHS\_2                  | 6      |             |
| LOGS\_NEW\_VALUE\_TIME\_WINDOW\_VALUE\_MONTHS\_3                  | 7      |             |

### LogsRatioConditionType

| Name                                                      | Number | Description |
| --------------------------------------------------------- | ------ | ----------- |
| LOGS\_RATIO\_CONDITION\_TYPE\_MORE\_THAN\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_RATIO\_CONDITION\_TYPE\_LESS\_THAN                  | 1      |             |

### LogsRatioGroupByFor

| Name                                               | Number | Description |
| -------------------------------------------------- | ------ | ----------- |
| LOGS\_RATIO\_GROUP\_BY\_FOR\_BOTH\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_RATIO\_GROUP\_BY\_FOR\_NUMERATOR\_ONLY       | 1      |             |
| LOGS\_RATIO\_GROUP\_BY\_FOR\_DENUMERATOR\_ONLY     | 2      |             |

### LogsRatioTimeWindow

| Field                                      | Type                     | Label | Description |
| ------------------------------------------ | ------------------------ | ----- | ----------- |
| logs\_ratio\_time\_window\_specific\_value | LogsRatioTimeWindowValue |       |             |

### LogsRatioTimeWindowValue

| Name                                                          | Number | Description |
| ------------------------------------------------------------- | ------ | ----------- |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_MINUTES\_5\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_MINUTES\_10                 | 1      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_MINUTES\_15                 | 2      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_MINUTES\_30                 | 3      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_HOUR\_1                     | 4      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_HOURS\_2                    | 5      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_HOURS\_4                    | 6      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_HOURS\_6                    | 7      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_HOURS\_12                   | 8      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_HOURS\_24                   | 9      |             |
| LOGS\_RATIO\_TIME\_WINDOW\_VALUE\_HOURS\_36                   | 10     |             |

### LogsThresholdConditionType

| Name                                                          | Number | Description |
| ------------------------------------------------------------- | ------ | ----------- |
| LOGS\_THRESHOLD\_CONDITION\_TYPE\_MORE\_THAN\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_THRESHOLD\_CONDITION\_TYPE\_LESS\_THAN                  | 1      |             |

### LogsTimeRelativeComparedTo

| Name                                                                | Number | Description |
| ------------------------------------------------------------------- | ------ | ----------- |
| LOGS\_TIME\_RELATIVE\_COMPARED\_TO\_PREVIOUS\_HOUR\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_TIME\_RELATIVE\_COMPARED\_TO\_SAME\_HOUR\_YESTERDAY           | 1      |             |
| LOGS\_TIME\_RELATIVE\_COMPARED\_TO\_SAME\_HOUR\_LAST\_WEEK          | 2      |             |
| LOGS\_TIME\_RELATIVE\_COMPARED\_TO\_YESTERDAY                       | 3      |             |
| LOGS\_TIME\_RELATIVE\_COMPARED\_TO\_SAME\_DAY\_LAST\_WEEK           | 4      |             |
| LOGS\_TIME\_RELATIVE\_COMPARED\_TO\_SAME\_DAY\_LAST\_MONTH          | 5      |             |

### LogsTimeRelativeConditionType

| Name                                                               | Number | Description |
| ------------------------------------------------------------------ | ------ | ----------- |
| LOGS\_TIME\_RELATIVE\_CONDITION\_TYPE\_MORE\_THAN\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_TIME\_RELATIVE\_CONDITION\_TYPE\_LESS\_THAN                  | 1      |             |

### LogsUniqueValueTimeWindow

| Field                                              | Type                           | Label | Description |
| -------------------------------------------------- | ------------------------------ | ----- | ----------- |
| logs\_unique\_value\_time\_window\_specific\_value | LogsUniqueValueTimeWindowValue |       |             |

### LogsUniqueValueTimeWindowValue

| Name                                                                 | Number | Description |
| -------------------------------------------------------------------- | ------ | ----------- |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_MINUTE\_1\_OR\_UNSPECIFIED | 0      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_MINUTES\_15                | 1      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_MINUTES\_20                | 2      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_MINUTES\_30                | 3      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_1                   | 4      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_2                   | 5      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_4                   | 6      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_6                   | 7      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_12                  | 8      |             |
| LOGS\_UNIQUE\_VALUE\_TIME\_WINDOW\_VALUE\_HOURS\_24                  | 9      |             |

### MetricAnomalyConditionType

| Name                                                                 | Number | Description |
| -------------------------------------------------------------------- | ------ | ----------- |
| METRIC\_ANOMALY\_CONDITION\_TYPE\_MORE\_THAN\_USUAL\_OR\_UNSPECIFIED | 0      |             |
| METRIC\_ANOMALY\_CONDITION\_TYPE\_LESS\_THAN\_USUAL                  | 1      |             |

### MetricTimeWindow

| Field                                 | Type                  | Label | Description |
| ------------------------------------- | --------------------- | ----- | ----------- |
| metric\_time\_window\_specific\_value | MetricTimeWindowValue |       |             |

### MetricTimeWindowValue

| Name                                                     | Number | Description |
| -------------------------------------------------------- | ------ | ----------- |
| METRIC\_TIME\_WINDOW\_VALUE\_MINUTES\_1\_OR\_UNSPECIFIED | 0      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_MINUTES\_5                  | 1      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_MINUTES\_10                 | 2      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_MINUTES\_15                 | 3      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_MINUTES\_30                 | 4      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_HOUR\_1                     | 5      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_HOURS\_2                    | 6      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_HOURS\_4                    | 7      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_HOURS\_6                    | 8      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_HOURS\_12                   | 9      |             |
| METRIC\_TIME\_WINDOW\_VALUE\_HOURS\_24                   | 10     |             |

### MetricFilter

| Field  | Type                        | Label | Description |
| ------ | --------------------------- | ----- | ----------- |
| promql | google.protobuf.StringValue |       |             |

### MetricAnomalyCondition

| Field                       | Type                        | Label | Description |
| --------------------------- | --------------------------- | ----- | ----------- |
| threshold                   | google.protobuf.DoubleValue |       |             |
| for\_over\_pct              | google.protobuf.UInt32Value |       |             |
| of\_the\_last               | MetricTimeWindow            |       |             |
| min\_non\_null\_values\_pct | google.protobuf.UInt32Value |       |             |
| condition\_type             | MetricAnomalyConditionType  |       |             |

### MetricAnomalyRule

| Field     | Type                   | Label | Description |
| --------- | ---------------------- | ----- | ----------- |
| condition | MetricAnomalyCondition |       |             |

### MetricAnomalyType

| Field          | Type              | Label    | Description |
| -------------- | ----------------- | -------- | ----------- |
| metric\_filter | MetricFilter      |          |             |
| rules          | MetricAnomalyRule | repeated |             |

### MetricThresholdCondition

| Field           | Type                         | Label | Description |
| --------------- | ---------------------------- | ----- | ----------- |
| threshold       | google.protobuf.DoubleValue  |       |             |
| for\_over\_pct  | google.protobuf.UInt32Value  |       |             |
| of\_the\_last   | MetricTimeWindow             |       |             |
| condition\_type | MetricThresholdConditionType |       |             |

### MetricThresholdRule

| Field     | Type                     | Label | Description |
| --------- | ------------------------ | ----- | ----------- |
| condition | MetricThresholdCondition |       |             |
| override  | AlertDefOverride         |       |             |

### MetricThresholdType

| Field                          | Type                       | Label    | Description |
| ------------------------------ | -------------------------- | -------- | ----------- |
| metric\_filter                 | MetricFilter               |          |             |
| rules                          | MetricThresholdRule        | repeated |             |
| missing\_values                | MetricMissingValues        |          |             |
| undetected\_values\_management | UndetectedValuesManagement |          |             |

### MetricThresholdConditionType

| Name                                                            | Number | Description |
| --------------------------------------------------------------- | ------ | ----------- |
| METRIC\_THRESHOLD\_CONDITION\_TYPE\_MORE\_THAN\_OR\_UNSPECIFIED | 0      |             |
| METRIC\_THRESHOLD\_CONDITION\_TYPE\_LESS\_THAN                  | 1      |             |
| METRIC\_THRESHOLD\_CONDITION\_TYPE\_MORE\_THAN\_OR\_EQUALS      | 2      |             |
| METRIC\_THRESHOLD\_CONDITION\_TYPE\_LESS\_THAN\_OR\_EQUALS      | 3      |             |

### MetricMissingValues

| Field                       | Type                        | Label | Description |
| --------------------------- | --------------------------- | ----- | ----------- |
| replace\_with\_zero         | google.protobuf.BoolValue   |       |             |
| min\_non\_null\_values\_pct | google.protobuf.UInt32Value |       |             |

### AlertDefOverride

| Field    | Type             | Label | Description |
| -------- | ---------------- | ----- | ----------- |
| priority | AlertDefPriority |       |             |

### TracingFilter

| Field          | Type                | Label | Description |
| -------------- | ------------------- | ----- | ----------- |
| simple\_filter | TracingSimpleFilter |       |             |

### TracingFilterType

| Field     | Type                        | Label    | Description |
| --------- | --------------------------- | -------- | ----------- |
| values    | google.protobuf.StringValue | repeated |             |
| operation | TracingFilterOperationType  |          |             |

### TracingLabelFilters

| Field             | Type                        | Label    | Description |
| ----------------- | --------------------------- | -------- | ----------- |
| application\_name | TracingFilterType           | repeated |             |
| subsystem\_name   | TracingFilterType           | repeated |             |
| service\_name     | TracingFilterType           | repeated |             |
| operation\_name   | TracingFilterType           | repeated |             |
| span\_fields      | TracingSpanFieldsFilterType | repeated |             |

### TracingSimpleFilter

| Field                   | Type                        | Label | Description |
| ----------------------- | --------------------------- | ----- | ----------- |
| tracing\_label\_filters | TracingLabelFilters         |       |             |
| latency\_threshold\_ms  | google.protobuf.UInt32Value |       |             |

### TracingSpanFieldsFilterType

| Field        | Type                        | Label | Description |
| ------------ | --------------------------- | ----- | ----------- |
| key          | google.protobuf.StringValue |       |             |
| filter\_type | TracingFilterType           |       |             |

### TracingFilterOperationType

| Name                                                  | Number | Description |
| ----------------------------------------------------- | ------ | ----------- |
| TRACING\_FILTER\_OPERATION\_TYPE\_IS\_OR\_UNSPECIFIED | 0      |             |
| TRACING\_FILTER\_OPERATION\_TYPE\_INCLUDES            | 1      |             |
| TRACING\_FILTER\_OPERATION\_TYPE\_ENDS\_WITH          | 2      |             |
| TRACING\_FILTER\_OPERATION\_TYPE\_STARTS\_WITH        | 3      |             |
| TRACING\_FILTER\_OPERATION\_TYPE\_IS\_NOT             | 4      |             |

### TracingThresholdConditionType

| Name                                                             | Number | Description |
| ---------------------------------------------------------------- | ------ | ----------- |
| TRACING\_THRESHOLD\_CONDITION\_TYPE\_MORE\_THAN\_OR\_UNSPECIFIED | 0      |             |

### TracingTimeWindow

| Field                        | Type                   | Label | Description |
| ---------------------------- | ---------------------- | ----- | ----------- |
| tracing\_time\_window\_value | TracingTimeWindowValue |       |             |

### TracingTimeWindowValue

| Name                                                      | Number | Description |
| --------------------------------------------------------- | ------ | ----------- |
| TRACING\_TIME\_WINDOW\_VALUE\_MINUTES\_5\_OR\_UNSPECIFIED | 0      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_MINUTES\_10                 | 1      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_MINUTES\_15                 | 2      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_MINUTES\_30                 | 3      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_HOUR\_1                     | 4      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_HOURS\_2                    | 5      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_HOURS\_4                    | 6      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_HOURS\_6                    | 7      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_HOURS\_12                   | 8      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_HOURS\_24                   | 9      |             |
| TRACING\_TIME\_WINDOW\_VALUE\_HOURS\_36                   | 10     |             |

### TracingImmediateType

| Field                         | Type                        | Label    | Description |
| ----------------------------- | --------------------------- | -------- | ----------- |
| tracing\_filter               | TracingFilter               |          |             |
| notification\_payload\_filter | google.protobuf.StringValue | repeated |             |

### TracingThresholdCondition

| Field           | Type                          | Label | Description |
| --------------- | ----------------------------- | ----- | ----------- |
| span\_amount    | google.protobuf.DoubleValue   |       |             |
| time\_window    | TracingTimeWindow             |       |             |
| condition\_type | TracingThresholdConditionType |       |             |

### TracingThresholdRule

| Field     | Type                      | Label | Description |
| --------- | ------------------------- | ----- | ----------- |
| condition | TracingThresholdCondition |       |             |

### TracingThresholdType

| Field                         | Type                        | Label    | Description |
| ----------------------------- | --------------------------- | -------- | ----------- |
| tracing\_filter               | TracingFilter               |          |             |
| rules                         | TracingThresholdRule        | repeated |             |
| notification\_payload\_filter | google.protobuf.StringValue | repeated |             |

### UndetectedValuesManagement

| Field                       | Type                      | Label    | Description |
| --------------------------- | ------------------------- | -------- | ----------- |
| trigger\_undetected\_values | google.protobuf.BoolValue |          |             |
| auto\_retire\_timeframe     | AutoRetireTimeframe       | optional |             |

### AutoRetireTimeframe

| Name                                            | Number | Description |
| ----------------------------------------------- | ------ | ----------- |
| AUTO\_RETIRE\_TIMEFRAME\_NEVER\_OR\_UNSPECIFIED | 0      |             |
| AUTO\_RETIRE\_TIMEFRAME\_MINUTES\_5             | 1      |             |
| AUTO\_RETIRE\_TIMEFRAME\_MINUTES\_10            | 2      |             |
| AUTO\_RETIRE\_TIMEFRAME\_HOUR\_1                | 3      |             |
| AUTO\_RETIRE\_TIMEFRAME\_HOURS\_2               | 4      |             |
| AUTO\_RETIRE\_TIMEFRAME\_HOURS\_6               | 5      |             |
| AUTO\_RETIRE\_TIMEFRAME\_HOURS\_12              | 6      |             |
| AUTO\_RETIRE\_TIMEFRAME\_HOURS\_24              | 7      |             |

### AuditLogDescription

| Field       | Type   | Label    | Description |
| ----------- | ------ | -------- | ----------- |
| description | string | optional |             |

### BatchGetAlertDefRequest

| Field | Type                        | Label    | Description |
| ----- | --------------------------- | -------- | ----------- |
| ids   | google.protobuf.StringValue | repeated |             |

### BatchGetAlertDefResponse

| Field           | Type                                    | Label    | Description |
| --------------- | --------------------------------------- | -------- | ----------- |
| alert\_defs     | BatchGetAlertDefResponse.AlertDefsEntry | repeated |             |
| not\_found\_ids | google.protobuf.StringValue             | repeated |             |

### BatchGetAlertDefResponse.AlertDefsEntry

| Field | Type     | Label | Description |
| ----- | -------- | ----- | ----------- |
| key   | string   |       |             |
| value | AlertDef |       |             |

### CreateAlertDefRequest

| Field                  | Type               | Label | Description |
| ---------------------- | ------------------ | ----- | ----------- |
| alert\_def\_properties | AlertDefProperties |       |             |

### CreateAlertDefResponse

| Field      | Type     | Label | Description |
| ---------- | -------- | ----- | ----------- |
| alert\_def | AlertDef |       |             |

### DeleteAlertDefRequest

| Field | Type                        | Label | Description |
| ----- | --------------------------- | ----- | ----------- |
| id    | google.protobuf.StringValue |       |             |

### DeleteAlertDefResponse

### DownloadAlertsRequest

### DownloadAlertsResponse

| Field   | Type  | Label | Description |
| ------- | ----- | ----- | ----------- |
| content | bytes |       |             |

### GetAlertDefRequest

| Field | Type                        | Label | Description                 |
| ----- | --------------------------- | ----- | --------------------------- |
| id    | google.protobuf.StringValue |       | The Alert's non changing ID |

### GetAlertDefResponse

| Field      | Type     | Label | Description |
| ---------- | -------- | ----- | ----------- |
| alert\_def | AlertDef |       |             |

### ListAlertDefsRequest

### ListAlertDefsResponse

| Field       | Type     | Label    | Description |
| ----------- | -------- | -------- | ----------- |
| alert\_defs | AlertDef | repeated |             |

### OrderBy

| Field       | Type             | Label | Description |
| ----------- | ---------------- | ----- | ----------- |
| field\_name | OrderByFields    |       |             |
| direction   | OrderByDirection |       |             |

### ReplaceAlertDefRequest

| Field                  | Type                        | Label | Description                      |
| ---------------------- | --------------------------- | ----- | -------------------------------- |
| alert\_def\_properties | AlertDefProperties          |       |                                  |
| id                     | google.protobuf.StringValue |       | The AlertDef's ID to be replaced |

### ReplaceAlertDefResponse

| Field      | Type     | Label | Description |
| ---------- | -------- | ----- | ----------- |
| alert\_def | AlertDef |       |             |

### SetActiveRequest

```
message AlertExecutionRequest {
  oneof request {
    CreateAlertDefRequest create = 1;
    ReplaceAlertDefRequest replace = 2;
    DeleteAlertDefRequest delete = 3;
  }
}

message AlertExecutionResponse {
  oneof response {
    CreateAlertDefResponse create = 1;
    ReplaceAlertDefResponse replace = 2;
    DeleteAlertDefResponse delete = 3;
  }
}

message GetLimitsRequest {}

message GetLimitsResponse {
  google.protobuf.StringValue company_id = 1;
  google.protobuf.Int32Value limit = 2;
  google.protobuf.Int32Value used = 3;
}

message ValidateAlertRequest {
  Alert alert = 1;
}

message ValidateAlertResponse {
  google.protobuf.BoolValue valid = 1;
}
```

| Field  | Type                        | Label | Description |
| ------ | --------------------------- | ----- | ----------- |
| id     | google.protobuf.StringValue |       |             |
| active | google.protobuf.BoolValue   |       |             |

### SetActiveResponse

### OrderByDirection

| Name                                       | Number | Description |
| ------------------------------------------ | ------ | ----------- |
| ORDER\_BY\_DIRECTION\_ASC\_OR\_UNSPECIFIED | 0      |             |
| ORDER\_BY\_DIRECTION\_DESC                 | 1      |             |

### OrderByFields

| Name                             | Number | Description |
| -------------------------------- | ------ | ----------- |
| `ORDER_BY_FIELDS_UNSPECIFIED`    | `0`    |             |
| `ORDER_BY_FIELDS_NAME`           | `1`    |             |
| `ORDER_BY_FIELDS_ID`             | `2`    |             |
| `ORDER_BY_FIELDS_SEVERITY`       | `3`    |             |
| `ORDER_BY_FIELDS_CREATED_TIME`   | `4`    |             |
| `ORDER_BY_FIELDS_UPDATED_TIME`   | `5`    |             |
| `ORDER_BY_FIELDS_LAST_TRIGGERED` | `6`    |             |

### File-level Extensions

| Extension               | Type                | Base                           | Number | Description |
| ----------------------- | ------------------- | ------------------------------ | ------ | ----------- |
| audit\_log\_description | AuditLogDescription | .google.protobuf.MethodOptions | 5000   |             |
