const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v3/alert-defs';
let options = {
method: 'PUT',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"alertDefProperties":{"name":"My Alert","description":"Alert description","enabled":true,"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED","activeOn":{"dayOfWeek":["DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED","DAY_OF_WEEK_TUESDAY"],"startTime":{"hours":14,"minutes":30},"endTime":{"hours":14,"minutes":30}},"type":"ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED","logsImmediate":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"notificationPayloadFilter":["obj.field"]},"tracingImmediate":{"tracingFilter":{"simpleFilter":{"tracingLabelFilters":{"applicationName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"serviceName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"operationName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"spanFields":[{"key":"span.field.key","filterType":{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}}]},"latencyThresholdMs":1000}},"notificationPayloadFilter":["obj.field"]},"logsThreshold":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"undetectedValuesManagement":{"triggerUndetectedValues":true,"autoRetireTimeframe":"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"},"rules":[{"condition":{"threshold":100,"timeWindow":{"logsTimeWindowSpecificValue":"LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"},"conditionType":"LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"notificationPayloadFilter":["obj.field"],"evaluationDelayMs":60000},"logsRatioThreshold":{"numerator":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"numeratorAlias":"numerator_alias","denominator":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"denominatorAlias":"denominator_alias","rules":[{"condition":{"threshold":10,"timeWindow":{"logsRatioTimeWindowSpecificValue":"LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"},"conditionType":"LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"notificationPayloadFilter":["obj.field"],"groupByFor":"LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED","undetectedValuesManagement":{"triggerUndetectedValues":true,"autoRetireTimeframe":"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"},"ignoreInfinity":true,"evaluationDelayMs":60000},"logsTimeRelativeThreshold":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"rules":[{"condition":{"threshold":0.1,"comparedTo":"LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED","conditionType":"LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"ignoreInfinity":true,"notificationPayloadFilter":["obj.field"],"undetectedValuesManagement":{"triggerUndetectedValues":true,"autoRetireTimeframe":"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"},"evaluationDelayMs":60000},"metricThreshold":{"metricFilter":{"promql":"avg_over_time(metric_name[5m]) > 10"},"rules":[{"condition":{"threshold":100,"forOverPct":80,"ofTheLast":{"metricTimeWindowSpecificValue":"METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED","metricTimeWindowDynamicDuration":"1h30m"},"conditionType":"METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"undetectedValuesManagement":{"triggerUndetectedValues":true,"autoRetireTimeframe":"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"},"missingValues":{"replaceWithZero":true,"minNonNullValuesPct":80},"evaluationDelayMs":60000},"tracingThreshold":{"tracingFilter":{"simpleFilter":{"tracingLabelFilters":{"applicationName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"serviceName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"operationName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"spanFields":[{"key":"span.field.key","filterType":{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}}]},"latencyThresholdMs":1000}},"rules":[{"condition":{"spanAmount":100,"timeWindow":{"tracingTimeWindowValue":"TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"},"conditionType":"TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"}}],"notificationPayloadFilter":["obj.field"]},"flow":{"stages":[{"flowStagesGroups":{"groups":[{"alertDefs":[{"id":"123e4567-e89b-12d3-a456-426614174000","not":true}],"nextOp":"NEXT_OP_AND_OR_UNSPECIFIED","alertsOp":"ALERTS_OP_AND_OR_UNSPECIFIED"}]},"timeframeMs":"string","timeframeType":"TIMEFRAME_TYPE_UNSPECIFIED"}],"enforceSuppression":true},"logsAnomaly":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"rules":[{"condition":{"minimumThreshold":10,"timeWindow":{"logsTimeWindowSpecificValue":"LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"},"conditionType":"LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"}}],"notificationPayloadFilter":["obj.field"],"evaluationDelayMs":60000,"anomalyAlertSettings":{"percentageOfDeviation":0.1}},"metricAnomaly":{"metricFilter":{"promql":"avg_over_time(metric_name[5m]) > 10"},"rules":[{"condition":{"threshold":10,"forOverPct":20,"ofTheLast":{"metricTimeWindowSpecificValue":"METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED","metricTimeWindowDynamicDuration":"1h30m"},"minNonNullValuesPct":10,"conditionType":"METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"}}],"evaluationDelayMs":60000,"anomalyAlertSettings":{"percentageOfDeviation":0.1}},"logsNewValue":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"rules":[{"condition":{"keypathToTrack":"metadata.field","timeWindow":{"logsNewValueTimeWindowSpecificValue":"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED"}}}],"notificationPayloadFilter":["obj.field"]},"logsUniqueCount":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"rules":[{"condition":{"maxUniqueCount":100,"timeWindow":{"logsUniqueValueTimeWindowSpecificValue":"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED"}}}],"notificationPayloadFilter":["obj.field"],"maxUniqueCountPerGroupByKey":100,"uniqueCountKeypath":"obj.field"},"sloThreshold":{"sloDefinition":{"sloId":"123e4567-e89b-12d3-a456-426614174000"},"errorBudget":{"rules":[{"condition":{"threshold":0.1},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}]},"burnRate":{"rules":[{"condition":{"threshold":0.1},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"dual":{"timeDuration":{"duration":60,"unit":"DURATION_UNIT_UNSPECIFIED"}},"single":{"timeDuration":{"duration":60,"unit":"DURATION_UNIT_UNSPECIFIED"}}}},"groupByKeys":["key1","key2"],"incidentsSettings":{"minutes":30,"notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"},"notificationGroup":{"groupByKeys":["key1","key2"],"webhooks":[{"minutes":15,"notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED","integration":{"integrationId":123,"recipients":{"emails":["[email protected]"]}}}],"destinations":[{"connectorId":"connector_id_example","presetId":"preset_id_example","notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED","triggeredRoutingOverrides":{"configOverrides":{"payloadType":"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default","messageConfigFields":[{"fieldName":"description","template":"template_example"}],"connectorConfigFields":[{"fieldName":"description","template":"template_example"}]}},"resolvedRouteOverrides":{"configOverrides":{"payloadType":"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default","messageConfigFields":[{"fieldName":"description","template":"template_example"}],"connectorConfigFields":[{"fieldName":"description","template":"template_example"}]}}}],"router":{"id":"123e4567-e89b-12d3-a456-426614174000","notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"}},"notificationGroupExcess":[{"groupByKeys":["key1","key2"],"webhooks":[{"minutes":15,"notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED","integration":{"integrationId":123,"recipients":{"emails":["[email protected]"]}}}],"destinations":[{"connectorId":"connector_id_example","presetId":"preset_id_example","notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED","triggeredRoutingOverrides":{"configOverrides":{"payloadType":"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default","messageConfigFields":[{"fieldName":"description","template":"template_example"}],"connectorConfigFields":[{"fieldName":"description","template":"template_example"}]}},"resolvedRouteOverrides":{"configOverrides":{"payloadType":"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default","messageConfigFields":[{"fieldName":"description","template":"template_example"}],"connectorConfigFields":[{"fieldName":"description","template":"template_example"}]}}}],"router":{"id":"123e4567-e89b-12d3-a456-426614174000","notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"}}],"entityLabels":{"key":"value"},"phantomMode":false,"deleted":false},"id":"123e4567-e89b-12d3-a456-426614174000"}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));{
"alertDef": {
"alertDefProperties": {
"name": "My Alert",
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED",
"type": "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED",
"description": "Alert description",
"enabled": true,
"activeOn": {
"dayOfWeek": [
"DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
"DAY_OF_WEEK_TUESDAY"
],
"startTime": {
"hours": 14,
"minutes": 30
},
"endTime": {
"hours": 14,
"minutes": 30
}
},
"logsImmediate": {
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
]
},
"tracingImmediate": {
"tracingFilter": {
"simpleFilter": {
"latencyThresholdMs": 1000,
"tracingLabelFilters": {
"applicationName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"serviceName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"operationName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"spanFields": [
{
"key": "span.field.key",
"filterType": {
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
}
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
]
},
"logsThreshold": {
"rules": [
{
"condition": {
"threshold": 100,
"timeWindow": {
"logsTimeWindowSpecificValue": "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
},
"conditionType": "LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"undetectedValuesManagement": {
"triggerUndetectedValues": true,
"autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"
},
"notificationPayloadFilter": [
"obj.field"
],
"evaluationDelayMs": 60000
},
"logsRatioThreshold": {
"numerator": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"denominator": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"rules": [
{
"condition": {
"threshold": 10,
"timeWindow": {
"logsRatioTimeWindowSpecificValue": "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
},
"conditionType": "LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"numeratorAlias": "numerator_alias",
"denominatorAlias": "denominator_alias",
"notificationPayloadFilter": [
"obj.field"
],
"groupByFor": "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED",
"undetectedValuesManagement": {
"triggerUndetectedValues": true,
"autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"
},
"ignoreInfinity": true,
"evaluationDelayMs": 60000
},
"logsTimeRelativeThreshold": {
"rules": [
{
"condition": {
"threshold": 123,
"comparedTo": "LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED",
"conditionType": "LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"ignoreInfinity": true,
"notificationPayloadFilter": [
"obj.field"
],
"undetectedValuesManagement": {
"triggerUndetectedValues": true,
"autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"
},
"evaluationDelayMs": 60000
},
"metricThreshold": {
"metricFilter": {
"promql": "avg_over_time(metric_name[5m]) > 10"
},
"rules": [
{
"condition": {
"threshold": 100,
"forOverPct": 80,
"ofTheLast": {
"metricTimeWindowSpecificValue": "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED",
"metricTimeWindowDynamicDuration": "1h30m"
},
"conditionType": "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"missingValues": {
"replaceWithZero": true,
"minNonNullValuesPct": 80
},
"undetectedValuesManagement": {
"triggerUndetectedValues": true,
"autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"
},
"evaluationDelayMs": 60000
},
"tracingThreshold": {
"tracingFilter": {
"simpleFilter": {
"latencyThresholdMs": 1000,
"tracingLabelFilters": {
"applicationName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"serviceName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"operationName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"spanFields": [
{
"key": "span.field.key",
"filterType": {
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
}
]
}
}
},
"rules": [
{
"condition": {
"spanAmount": 100,
"timeWindow": {
"tracingTimeWindowValue": "TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
},
"conditionType": "TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
}
}
],
"notificationPayloadFilter": [
"obj.field"
]
},
"flow": {
"stages": [
{
"timeframeMs": "<string>",
"timeframeType": "TIMEFRAME_TYPE_UNSPECIFIED",
"flowStagesGroups": {
"groups": [
{
"alertDefs": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"not": true
}
],
"nextOp": "NEXT_OP_AND_OR_UNSPECIFIED",
"alertsOp": "ALERTS_OP_AND_OR_UNSPECIFIED"
}
]
}
}
],
"enforceSuppression": true
},
"logsAnomaly": {
"rules": [
{
"condition": {
"minimumThreshold": 10,
"timeWindow": {
"logsTimeWindowSpecificValue": "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
},
"conditionType": "LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
}
}
],
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
],
"evaluationDelayMs": 60000,
"anomalyAlertSettings": {
"percentageOfDeviation": 123
}
},
"metricAnomaly": {
"metricFilter": {
"promql": "avg_over_time(metric_name[5m]) > 10"
},
"rules": [
{
"condition": {
"threshold": 10,
"ofTheLast": {
"metricTimeWindowSpecificValue": "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED",
"metricTimeWindowDynamicDuration": "1h30m"
},
"minNonNullValuesPct": 10,
"conditionType": "METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED",
"forOverPct": 20
}
}
],
"evaluationDelayMs": 60000,
"anomalyAlertSettings": {
"percentageOfDeviation": 123
}
},
"logsNewValue": {
"rules": [
{
"condition": {
"keypathToTrack": "metadata.field",
"timeWindow": {
"logsNewValueTimeWindowSpecificValue": "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED"
}
}
}
],
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
]
},
"logsUniqueCount": {
"rules": [
{
"condition": {
"maxUniqueCount": 100,
"timeWindow": {
"logsUniqueValueTimeWindowSpecificValue": "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED"
}
}
}
],
"uniqueCountKeypath": "obj.field",
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
],
"maxUniqueCountPerGroupByKey": 100
},
"sloThreshold": {
"sloDefinition": {
"sloId": "123e4567-e89b-12d3-a456-426614174000"
},
"errorBudget": {
"rules": [
{
"condition": {
"threshold": 123
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
]
},
"burnRate": {
"rules": [
{
"condition": {
"threshold": 123
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"dual": {
"timeDuration": {
"duration": 60,
"unit": "DURATION_UNIT_UNSPECIFIED"
}
},
"single": {
"timeDuration": {
"duration": 60,
"unit": "DURATION_UNIT_UNSPECIFIED"
}
}
}
},
"groupByKeys": [
"key1",
"key2"
],
"incidentsSettings": {
"minutes": 30,
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
},
"notificationGroup": {
"groupByKeys": [
"key1",
"key2"
],
"webhooks": [
{
"integration": {
"integrationId": 123,
"recipients": {
"emails": [
"[email protected]"
]
}
},
"minutes": 15,
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
}
],
"destinations": [
{
"connectorId": "connector_id_example",
"presetId": "preset_id_example",
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
"triggeredRoutingOverrides": {
"configOverrides": {
"payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default",
"messageConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
],
"connectorConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
]
}
},
"resolvedRouteOverrides": {
"configOverrides": {
"payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default",
"messageConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
],
"connectorConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
]
}
}
}
],
"router": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
}
},
"notificationGroupExcess": [
{
"groupByKeys": [
"key1",
"key2"
],
"webhooks": [
{
"integration": {
"integrationId": 123,
"recipients": {
"emails": [
"[email protected]"
]
}
},
"minutes": 15,
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
}
],
"destinations": [
{
"connectorId": "connector_id_example",
"presetId": "preset_id_example",
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
"triggeredRoutingOverrides": {
"configOverrides": {
"payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default",
"messageConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
],
"connectorConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
]
}
},
"resolvedRouteOverrides": {
"configOverrides": {
"payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default",
"messageConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
],
"connectorConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
]
}
}
}
],
"router": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
}
}
],
"entityLabels": {
"key": "value"
},
"phantomMode": false,
"deleted": false
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"alertVersionId": "<string>",
"createdTime": "2023-10-01T12:00:00.000Z",
"updatedTime": "2023-10-01T12:00:00.000Z",
"lastTriggeredTime": "2023-10-01T12:00:00.000Z"
}
}No description available
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v3/alert-defs';
let options = {
method: 'PUT',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"alertDefProperties":{"name":"My Alert","description":"Alert description","enabled":true,"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED","activeOn":{"dayOfWeek":["DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED","DAY_OF_WEEK_TUESDAY"],"startTime":{"hours":14,"minutes":30},"endTime":{"hours":14,"minutes":30}},"type":"ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED","logsImmediate":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"notificationPayloadFilter":["obj.field"]},"tracingImmediate":{"tracingFilter":{"simpleFilter":{"tracingLabelFilters":{"applicationName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"serviceName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"operationName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"spanFields":[{"key":"span.field.key","filterType":{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}}]},"latencyThresholdMs":1000}},"notificationPayloadFilter":["obj.field"]},"logsThreshold":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"undetectedValuesManagement":{"triggerUndetectedValues":true,"autoRetireTimeframe":"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"},"rules":[{"condition":{"threshold":100,"timeWindow":{"logsTimeWindowSpecificValue":"LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"},"conditionType":"LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"notificationPayloadFilter":["obj.field"],"evaluationDelayMs":60000},"logsRatioThreshold":{"numerator":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"numeratorAlias":"numerator_alias","denominator":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"denominatorAlias":"denominator_alias","rules":[{"condition":{"threshold":10,"timeWindow":{"logsRatioTimeWindowSpecificValue":"LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"},"conditionType":"LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"notificationPayloadFilter":["obj.field"],"groupByFor":"LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED","undetectedValuesManagement":{"triggerUndetectedValues":true,"autoRetireTimeframe":"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"},"ignoreInfinity":true,"evaluationDelayMs":60000},"logsTimeRelativeThreshold":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"rules":[{"condition":{"threshold":0.1,"comparedTo":"LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED","conditionType":"LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"ignoreInfinity":true,"notificationPayloadFilter":["obj.field"],"undetectedValuesManagement":{"triggerUndetectedValues":true,"autoRetireTimeframe":"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"},"evaluationDelayMs":60000},"metricThreshold":{"metricFilter":{"promql":"avg_over_time(metric_name[5m]) > 10"},"rules":[{"condition":{"threshold":100,"forOverPct":80,"ofTheLast":{"metricTimeWindowSpecificValue":"METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED","metricTimeWindowDynamicDuration":"1h30m"},"conditionType":"METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"undetectedValuesManagement":{"triggerUndetectedValues":true,"autoRetireTimeframe":"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"},"missingValues":{"replaceWithZero":true,"minNonNullValuesPct":80},"evaluationDelayMs":60000},"tracingThreshold":{"tracingFilter":{"simpleFilter":{"tracingLabelFilters":{"applicationName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"serviceName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"operationName":[{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"spanFields":[{"key":"span.field.key","filterType":{"values":["value1","value2"],"operation":"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}}]},"latencyThresholdMs":1000}},"rules":[{"condition":{"spanAmount":100,"timeWindow":{"tracingTimeWindowValue":"TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"},"conditionType":"TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"}}],"notificationPayloadFilter":["obj.field"]},"flow":{"stages":[{"flowStagesGroups":{"groups":[{"alertDefs":[{"id":"123e4567-e89b-12d3-a456-426614174000","not":true}],"nextOp":"NEXT_OP_AND_OR_UNSPECIFIED","alertsOp":"ALERTS_OP_AND_OR_UNSPECIFIED"}]},"timeframeMs":"string","timeframeType":"TIMEFRAME_TYPE_UNSPECIFIED"}],"enforceSuppression":true},"logsAnomaly":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"rules":[{"condition":{"minimumThreshold":10,"timeWindow":{"logsTimeWindowSpecificValue":"LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"},"conditionType":"LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"}}],"notificationPayloadFilter":["obj.field"],"evaluationDelayMs":60000,"anomalyAlertSettings":{"percentageOfDeviation":0.1}},"metricAnomaly":{"metricFilter":{"promql":"avg_over_time(metric_name[5m]) > 10"},"rules":[{"condition":{"threshold":10,"forOverPct":20,"ofTheLast":{"metricTimeWindowSpecificValue":"METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED","metricTimeWindowDynamicDuration":"1h30m"},"minNonNullValuesPct":10,"conditionType":"METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"}}],"evaluationDelayMs":60000,"anomalyAlertSettings":{"percentageOfDeviation":0.1}},"logsNewValue":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"rules":[{"condition":{"keypathToTrack":"metadata.field","timeWindow":{"logsNewValueTimeWindowSpecificValue":"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED"}}}],"notificationPayloadFilter":["obj.field"]},"logsUniqueCount":{"logsFilter":{"simpleFilter":{"luceneQuery":"string","labelFilters":{"applicationName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"subsystemName":[{"value":"my-app","operation":"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"}],"severities":["LOG_SEVERITY_VERBOSE_UNSPECIFIED"]}}},"rules":[{"condition":{"maxUniqueCount":100,"timeWindow":{"logsUniqueValueTimeWindowSpecificValue":"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED"}}}],"notificationPayloadFilter":["obj.field"],"maxUniqueCountPerGroupByKey":100,"uniqueCountKeypath":"obj.field"},"sloThreshold":{"sloDefinition":{"sloId":"123e4567-e89b-12d3-a456-426614174000"},"errorBudget":{"rules":[{"condition":{"threshold":0.1},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}]},"burnRate":{"rules":[{"condition":{"threshold":0.1},"override":{"priority":"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"}}],"dual":{"timeDuration":{"duration":60,"unit":"DURATION_UNIT_UNSPECIFIED"}},"single":{"timeDuration":{"duration":60,"unit":"DURATION_UNIT_UNSPECIFIED"}}}},"groupByKeys":["key1","key2"],"incidentsSettings":{"minutes":30,"notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"},"notificationGroup":{"groupByKeys":["key1","key2"],"webhooks":[{"minutes":15,"notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED","integration":{"integrationId":123,"recipients":{"emails":["[email protected]"]}}}],"destinations":[{"connectorId":"connector_id_example","presetId":"preset_id_example","notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED","triggeredRoutingOverrides":{"configOverrides":{"payloadType":"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default","messageConfigFields":[{"fieldName":"description","template":"template_example"}],"connectorConfigFields":[{"fieldName":"description","template":"template_example"}]}},"resolvedRouteOverrides":{"configOverrides":{"payloadType":"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default","messageConfigFields":[{"fieldName":"description","template":"template_example"}],"connectorConfigFields":[{"fieldName":"description","template":"template_example"}]}}}],"router":{"id":"123e4567-e89b-12d3-a456-426614174000","notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"}},"notificationGroupExcess":[{"groupByKeys":["key1","key2"],"webhooks":[{"minutes":15,"notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED","integration":{"integrationId":123,"recipients":{"emails":["[email protected]"]}}}],"destinations":[{"connectorId":"connector_id_example","presetId":"preset_id_example","notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED","triggeredRoutingOverrides":{"configOverrides":{"payloadType":"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default","messageConfigFields":[{"fieldName":"description","template":"template_example"}],"connectorConfigFields":[{"fieldName":"description","template":"template_example"}]}},"resolvedRouteOverrides":{"configOverrides":{"payloadType":"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default","messageConfigFields":[{"fieldName":"description","template":"template_example"}],"connectorConfigFields":[{"fieldName":"description","template":"template_example"}]}}}],"router":{"id":"123e4567-e89b-12d3-a456-426614174000","notifyOn":"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"}}],"entityLabels":{"key":"value"},"phantomMode":false,"deleted":false},"id":"123e4567-e89b-12d3-a456-426614174000"}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));{
"alertDef": {
"alertDefProperties": {
"name": "My Alert",
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED",
"type": "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED",
"description": "Alert description",
"enabled": true,
"activeOn": {
"dayOfWeek": [
"DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
"DAY_OF_WEEK_TUESDAY"
],
"startTime": {
"hours": 14,
"minutes": 30
},
"endTime": {
"hours": 14,
"minutes": 30
}
},
"logsImmediate": {
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
]
},
"tracingImmediate": {
"tracingFilter": {
"simpleFilter": {
"latencyThresholdMs": 1000,
"tracingLabelFilters": {
"applicationName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"serviceName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"operationName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"spanFields": [
{
"key": "span.field.key",
"filterType": {
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
}
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
]
},
"logsThreshold": {
"rules": [
{
"condition": {
"threshold": 100,
"timeWindow": {
"logsTimeWindowSpecificValue": "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
},
"conditionType": "LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"undetectedValuesManagement": {
"triggerUndetectedValues": true,
"autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"
},
"notificationPayloadFilter": [
"obj.field"
],
"evaluationDelayMs": 60000
},
"logsRatioThreshold": {
"numerator": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"denominator": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"rules": [
{
"condition": {
"threshold": 10,
"timeWindow": {
"logsRatioTimeWindowSpecificValue": "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
},
"conditionType": "LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"numeratorAlias": "numerator_alias",
"denominatorAlias": "denominator_alias",
"notificationPayloadFilter": [
"obj.field"
],
"groupByFor": "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED",
"undetectedValuesManagement": {
"triggerUndetectedValues": true,
"autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"
},
"ignoreInfinity": true,
"evaluationDelayMs": 60000
},
"logsTimeRelativeThreshold": {
"rules": [
{
"condition": {
"threshold": 123,
"comparedTo": "LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED",
"conditionType": "LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"ignoreInfinity": true,
"notificationPayloadFilter": [
"obj.field"
],
"undetectedValuesManagement": {
"triggerUndetectedValues": true,
"autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"
},
"evaluationDelayMs": 60000
},
"metricThreshold": {
"metricFilter": {
"promql": "avg_over_time(metric_name[5m]) > 10"
},
"rules": [
{
"condition": {
"threshold": 100,
"forOverPct": 80,
"ofTheLast": {
"metricTimeWindowSpecificValue": "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED",
"metricTimeWindowDynamicDuration": "1h30m"
},
"conditionType": "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"missingValues": {
"replaceWithZero": true,
"minNonNullValuesPct": 80
},
"undetectedValuesManagement": {
"triggerUndetectedValues": true,
"autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED"
},
"evaluationDelayMs": 60000
},
"tracingThreshold": {
"tracingFilter": {
"simpleFilter": {
"latencyThresholdMs": 1000,
"tracingLabelFilters": {
"applicationName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"serviceName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"operationName": [
{
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"spanFields": [
{
"key": "span.field.key",
"filterType": {
"values": [
"value1",
"value2"
],
"operation": "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
}
]
}
}
},
"rules": [
{
"condition": {
"spanAmount": 100,
"timeWindow": {
"tracingTimeWindowValue": "TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
},
"conditionType": "TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
}
}
],
"notificationPayloadFilter": [
"obj.field"
]
},
"flow": {
"stages": [
{
"timeframeMs": "<string>",
"timeframeType": "TIMEFRAME_TYPE_UNSPECIFIED",
"flowStagesGroups": {
"groups": [
{
"alertDefs": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"not": true
}
],
"nextOp": "NEXT_OP_AND_OR_UNSPECIFIED",
"alertsOp": "ALERTS_OP_AND_OR_UNSPECIFIED"
}
]
}
}
],
"enforceSuppression": true
},
"logsAnomaly": {
"rules": [
{
"condition": {
"minimumThreshold": 10,
"timeWindow": {
"logsTimeWindowSpecificValue": "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
},
"conditionType": "LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
}
}
],
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
],
"evaluationDelayMs": 60000,
"anomalyAlertSettings": {
"percentageOfDeviation": 123
}
},
"metricAnomaly": {
"metricFilter": {
"promql": "avg_over_time(metric_name[5m]) > 10"
},
"rules": [
{
"condition": {
"threshold": 10,
"ofTheLast": {
"metricTimeWindowSpecificValue": "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED",
"metricTimeWindowDynamicDuration": "1h30m"
},
"minNonNullValuesPct": 10,
"conditionType": "METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED",
"forOverPct": 20
}
}
],
"evaluationDelayMs": 60000,
"anomalyAlertSettings": {
"percentageOfDeviation": 123
}
},
"logsNewValue": {
"rules": [
{
"condition": {
"keypathToTrack": "metadata.field",
"timeWindow": {
"logsNewValueTimeWindowSpecificValue": "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED"
}
}
}
],
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
]
},
"logsUniqueCount": {
"rules": [
{
"condition": {
"maxUniqueCount": 100,
"timeWindow": {
"logsUniqueValueTimeWindowSpecificValue": "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED"
}
}
}
],
"uniqueCountKeypath": "obj.field",
"logsFilter": {
"simpleFilter": {
"luceneQuery": "<string>",
"labelFilters": {
"applicationName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"subsystemName": [
{
"value": "my-app",
"operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED"
}
],
"severities": [
"LOG_SEVERITY_VERBOSE_UNSPECIFIED"
]
}
}
},
"notificationPayloadFilter": [
"obj.field"
],
"maxUniqueCountPerGroupByKey": 100
},
"sloThreshold": {
"sloDefinition": {
"sloId": "123e4567-e89b-12d3-a456-426614174000"
},
"errorBudget": {
"rules": [
{
"condition": {
"threshold": 123
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
]
},
"burnRate": {
"rules": [
{
"condition": {
"threshold": 123
},
"override": {
"priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
}
}
],
"dual": {
"timeDuration": {
"duration": 60,
"unit": "DURATION_UNIT_UNSPECIFIED"
}
},
"single": {
"timeDuration": {
"duration": 60,
"unit": "DURATION_UNIT_UNSPECIFIED"
}
}
}
},
"groupByKeys": [
"key1",
"key2"
],
"incidentsSettings": {
"minutes": 30,
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
},
"notificationGroup": {
"groupByKeys": [
"key1",
"key2"
],
"webhooks": [
{
"integration": {
"integrationId": 123,
"recipients": {
"emails": [
"[email protected]"
]
}
},
"minutes": 15,
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
}
],
"destinations": [
{
"connectorId": "connector_id_example",
"presetId": "preset_id_example",
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
"triggeredRoutingOverrides": {
"configOverrides": {
"payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default",
"messageConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
],
"connectorConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
]
}
},
"resolvedRouteOverrides": {
"configOverrides": {
"payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default",
"messageConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
],
"connectorConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
]
}
}
}
],
"router": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
}
},
"notificationGroupExcess": [
{
"groupByKeys": [
"key1",
"key2"
],
"webhooks": [
{
"integration": {
"integrationId": 123,
"recipients": {
"emails": [
"[email protected]"
]
}
},
"minutes": 15,
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
}
],
"destinations": [
{
"connectorId": "connector_id_example",
"presetId": "preset_id_example",
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
"triggeredRoutingOverrides": {
"configOverrides": {
"payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default",
"messageConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
],
"connectorConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
]
}
},
"resolvedRouteOverrides": {
"configOverrides": {
"payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default",
"messageConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
],
"connectorConfigFields": [
{
"fieldName": "description",
"template": "template_example"
}
]
}
}
}
],
"router": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
}
}
],
"entityLabels": {
"key": "value"
},
"phantomMode": false,
"deleted": false
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"alertVersionId": "<string>",
"createdTime": "2023-10-01T12:00:00.000Z",
"updatedTime": "2023-10-01T12:00:00.000Z",
"lastTriggeredTime": "2023-10-01T12:00:00.000Z"
}
}API key authentication
A request to replace an existing alert definition
A request to replace an existing alert definition
User-configurable properties of an alert definition
Show child attributes
The name of the alert definition
"My Alert"
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED, ALERT_DEF_TYPE_LOGS_THRESHOLD, ALERT_DEF_TYPE_LOGS_ANOMALY, ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD, ALERT_DEF_TYPE_LOGS_NEW_VALUE, ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT, ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD, ALERT_DEF_TYPE_METRIC_THRESHOLD, ALERT_DEF_TYPE_METRIC_ANOMALY, ALERT_DEF_TYPE_TRACING_IMMEDIATE, ALERT_DEF_TYPE_TRACING_THRESHOLD, ALERT_DEF_TYPE_FLOW, ALERT_DEF_TYPE_SLO_THRESHOLD A detailed description of what the alert monitors and when it triggers
"Alert description"
Whether the alert is currently active and monitoring
true
Defines when an alert should be active based on days of the week and time windows
Show child attributes
DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED, DAY_OF_WEEK_TUESDAY, DAY_OF_WEEK_WEDNESDAY, DAY_OF_WEEK_THURSDAY, DAY_OF_WEEK_FRIDAY, DAY_OF_WEEK_SATURDAY, DAY_OF_WEEK_SUNDAY [
"DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
"DAY_OF_WEEK_TUESDAY"
]Represents a specific time in a 24-hour format
Represents a specific time in a 24-hour format
Configuration for immediate alerts triggered on log entries matching specific filters.
Show child attributes
Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL ["obj.field"]Configuration for immediate alerts triggered on trace entries
Show child attributes
Filter configuration for tracing-based alerts
Show child attributes
Basic filter configuration using a latency threshold and label filters
Show child attributes
The latency threshold to filter traces in milliseconds
1000
Filters for application name, subsystem name, service name, operation name and span fields
Show child attributes
Filter by application names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by subsystem names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by service names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by operation names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by span fields
Show child attributes
The key of the span field to filter by
"span.field.key"
Filter type for trace entries
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Notification payload field filter
["obj.field"]Configuration for alerts triggered when log counts exceed or fall below specified thresholds
Show child attributes
The rules for the threshold alert
1 - 5 elementsShow child attributes
LogsThresholdCondition is a message that defines the condition for log-based threshold alerts.
Show child attributes
The threshold value for the alert condition
100
Time window configuration for log-based alerts
Show child attributes
LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED, LOGS_TIME_WINDOW_VALUE_MINUTES_10, LOGS_TIME_WINDOW_VALUE_MINUTES_20, LOGS_TIME_WINDOW_VALUE_MINUTES_15, LOGS_TIME_WINDOW_VALUE_MINUTES_30, LOGS_TIME_WINDOW_VALUE_HOUR_1, LOGS_TIME_WINDOW_VALUE_HOURS_2, LOGS_TIME_WINDOW_VALUE_HOURS_4, LOGS_TIME_WINDOW_VALUE_HOURS_6, LOGS_TIME_WINDOW_VALUE_HOURS_12, LOGS_TIME_WINDOW_VALUE_HOURS_24, LOGS_TIME_WINDOW_VALUE_HOURS_36 LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED, LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL Configuration for handling undetected values in alerts
Show child attributes
Should trigger the alert when undetected values are detected
true
AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED, AUTO_RETIRE_TIMEFRAME_MINUTES_5, AUTO_RETIRE_TIMEFRAME_MINUTES_10, AUTO_RETIRE_TIMEFRAME_HOUR_1, AUTO_RETIRE_TIMEFRAME_HOURS_2, AUTO_RETIRE_TIMEFRAME_HOURS_6, AUTO_RETIRE_TIMEFRAME_HOURS_12, AUTO_RETIRE_TIMEFRAME_HOURS_24 The filter to specify which fields to include in the notification payload
["obj.field"]The delay in milliseconds before evaluating the alert condition
60000
Configuration for alerts based on the ratio between two log queries
Show child attributes
Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL The rules for the ratio alert
1 - 5 elementsShow child attributes
Defines conditions for ratio-based alerts
Show child attributes
The threshold value for the alert condition
10
Time window configuration for ratio alerts
Show child attributes
LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED, LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10, LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15, LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30, LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36 LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED, LOGS_RATIO_CONDITION_TYPE_LESS_THAN Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 The alias for the numerator filter, used for display purposes
"numerator_alias"
The alias for the denominator filter, used for display purposes
"denominator_alias"
["obj.field"]LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED, LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY, LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY Configuration for handling undetected values in alerts
Show child attributes
Should trigger the alert when undetected values are detected
true
AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED, AUTO_RETIRE_TIMEFRAME_MINUTES_5, AUTO_RETIRE_TIMEFRAME_MINUTES_10, AUTO_RETIRE_TIMEFRAME_HOUR_1, AUTO_RETIRE_TIMEFRAME_HOURS_2, AUTO_RETIRE_TIMEFRAME_HOURS_6, AUTO_RETIRE_TIMEFRAME_HOURS_12, AUTO_RETIRE_TIMEFRAME_HOURS_24 The configuration for ignoring infinity values in the ratio
true
The delay in milliseconds before evaluating the alert condition
60000
Configuration for alerts that are triggered when a fixed ratio reaches a set threshold compared to a past time frame.
Show child attributes
The rules for the time-relative alert
1 - 5 elementsShow child attributes
Defines conditions for time-relative comparison alerts
Show child attributes
The threshold value for the alert condition.
LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED, LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY, LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK, LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY, LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK, LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED, LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL Ignore infinity values in the alert
true
["obj.field"]Configuration for handling undetected values in alerts
Show child attributes
Should trigger the alert when undetected values are detected
true
AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED, AUTO_RETIRE_TIMEFRAME_MINUTES_5, AUTO_RETIRE_TIMEFRAME_MINUTES_10, AUTO_RETIRE_TIMEFRAME_HOUR_1, AUTO_RETIRE_TIMEFRAME_HOURS_2, AUTO_RETIRE_TIMEFRAME_HOURS_6, AUTO_RETIRE_TIMEFRAME_HOURS_12, AUTO_RETIRE_TIMEFRAME_HOURS_24 The delay in milliseconds before evaluating the alert condition
60000
Configuration for alerts based on metric threshold violations
Show child attributes
The rules for the metric threshold alert
1 - 5 elementsShow child attributes
Defines conditions for metric threshold alerts
Show child attributes
The threshold value for the alert condition
100
The percentage of values that must exceed the threshold to trigger the alert
80
Show child attributes
METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED, METRIC_TIME_WINDOW_VALUE_MINUTES_5, METRIC_TIME_WINDOW_VALUE_MINUTES_10, METRIC_TIME_WINDOW_VALUE_MINUTES_15, METRIC_TIME_WINDOW_VALUE_MINUTES_20, METRIC_TIME_WINDOW_VALUE_MINUTES_30, METRIC_TIME_WINDOW_VALUE_HOUR_1, METRIC_TIME_WINDOW_VALUE_HOURS_2, METRIC_TIME_WINDOW_VALUE_HOURS_4, METRIC_TIME_WINDOW_VALUE_HOURS_6, METRIC_TIME_WINDOW_VALUE_HOURS_12, METRIC_TIME_WINDOW_VALUE_HOURS_24, METRIC_TIME_WINDOW_VALUE_HOURS_36 The time window as a dynamic value
"1h30m"
METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED, METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN, METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS, METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Configuration for handling missing values in metric threshold alerts.
Show child attributes
If set to true, missing values will be replaced with zero
true
If set, specifies the minimum percentage of non-null values required for the alert to be triggered
80
Configuration for handling undetected values in alerts
Show child attributes
Should trigger the alert when undetected values are detected
true
AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED, AUTO_RETIRE_TIMEFRAME_MINUTES_5, AUTO_RETIRE_TIMEFRAME_MINUTES_10, AUTO_RETIRE_TIMEFRAME_HOUR_1, AUTO_RETIRE_TIMEFRAME_HOURS_2, AUTO_RETIRE_TIMEFRAME_HOURS_6, AUTO_RETIRE_TIMEFRAME_HOURS_12, AUTO_RETIRE_TIMEFRAME_HOURS_24 The delay in milliseconds before evaluating the alert condition
60000
Configuration for alerts based on trace count thresholds
Show child attributes
Filter configuration for tracing-based alerts
Show child attributes
Basic filter configuration using a latency threshold and label filters
Show child attributes
The latency threshold to filter traces in milliseconds
1000
Filters for application name, subsystem name, service name, operation name and span fields
Show child attributes
Filter by application names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by subsystem names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by service names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by operation names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by span fields
Show child attributes
The key of the span field to filter by
"span.field.key"
Filter type for trace entries
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT The rules for the trace threshold alert.
1 elementShow child attributes
Show child attributes
The threshold value for the alert condition
100
Show child attributes
TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED, TRACING_TIME_WINDOW_VALUE_MINUTES_10, TRACING_TIME_WINDOW_VALUE_MINUTES_15, TRACING_TIME_WINDOW_VALUE_MINUTES_20, TRACING_TIME_WINDOW_VALUE_MINUTES_30, TRACING_TIME_WINDOW_VALUE_HOUR_1, TRACING_TIME_WINDOW_VALUE_HOURS_2, TRACING_TIME_WINDOW_VALUE_HOURS_4, TRACING_TIME_WINDOW_VALUE_HOURS_6, TRACING_TIME_WINDOW_VALUE_HOURS_12, TRACING_TIME_WINDOW_VALUE_HOURS_24, TRACING_TIME_WINDOW_VALUE_HOURS_36 TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED Notification payload field filter
["obj.field"]Configuration for flow-based alerts with multiple stages
Show child attributes
The stages of the flow alert.
1Show child attributes
TIMEFRAME_TYPE_UNSPECIFIED, TIMEFRAME_TYPE_UP_TO Groups of stages in a flow alert
Show child attributes
Show child attributes
The alert definitions for the flow stage group.
1Show child attributes
NEXT_OP_AND_OR_UNSPECIFIED, NEXT_OP_OR ALERTS_OP_AND_OR_UNSPECIFIED, ALERTS_OP_OR Configuration for alerts triggered by anomalous log patterns
Show child attributes
The rules for the log anomaly alert
1 elementShow child attributes
Defines conditions for detecting log anomalies
Show child attributes
The threshold value for the alert condition
10
Time window configuration for log-based alerts
Show child attributes
LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED, LOGS_TIME_WINDOW_VALUE_MINUTES_10, LOGS_TIME_WINDOW_VALUE_MINUTES_20, LOGS_TIME_WINDOW_VALUE_MINUTES_15, LOGS_TIME_WINDOW_VALUE_MINUTES_30, LOGS_TIME_WINDOW_VALUE_HOUR_1, LOGS_TIME_WINDOW_VALUE_HOURS_2, LOGS_TIME_WINDOW_VALUE_HOURS_4, LOGS_TIME_WINDOW_VALUE_HOURS_6, LOGS_TIME_WINDOW_VALUE_HOURS_12, LOGS_TIME_WINDOW_VALUE_HOURS_24, LOGS_TIME_WINDOW_VALUE_HOURS_36 LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL The filter to specify which fields to include in the notification payload
["obj.field"]The delay in milliseconds before evaluating the alert condition
60000
Common settings for anomaly-based alerts.
Show child attributes
The percentage of deviation from the baseline for triggering the alert.
Configuration for alerts triggered by anomalous metric patterns
Show child attributes
The rules for the metric anomaly alert.
1 elementShow child attributes
Show child attributes
The threshold value for the alert condition
10
Show child attributes
METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED, METRIC_TIME_WINDOW_VALUE_MINUTES_5, METRIC_TIME_WINDOW_VALUE_MINUTES_10, METRIC_TIME_WINDOW_VALUE_MINUTES_15, METRIC_TIME_WINDOW_VALUE_MINUTES_20, METRIC_TIME_WINDOW_VALUE_MINUTES_30, METRIC_TIME_WINDOW_VALUE_HOUR_1, METRIC_TIME_WINDOW_VALUE_HOURS_2, METRIC_TIME_WINDOW_VALUE_HOURS_4, METRIC_TIME_WINDOW_VALUE_HOURS_6, METRIC_TIME_WINDOW_VALUE_HOURS_12, METRIC_TIME_WINDOW_VALUE_HOURS_24, METRIC_TIME_WINDOW_VALUE_HOURS_36 The time window as a dynamic value
"1h30m"
The percentage of non-null values required to trigger the alert
10
METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED, METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL The percentage of the metric that must exceed the threshold to trigger the alert
20
The delay in milliseconds before evaluating the alert condition
60000
Common settings for anomaly-based alerts.
Show child attributes
The percentage of deviation from the baseline for triggering the alert.
Configuration for alerts triggered by new values appearing in logs
Show child attributes
The rules for the log new value alert.
1 elementShow child attributes
Defines conditions for detecting new values in logs
Show child attributes
The keypath to track for new values
"metadata.field"
Time window configuration for log-based new value alerts
Show child attributes
LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3 Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL The filter to specify which fields to include in the notification payload.
["obj.field"]Configuration for alerts based on unique value counts in logs
Show child attributes
The rules for the log unique count alert
1 elementShow child attributes
Defines conditions for unique count alerts
Show child attributes
The maximum unique count
100
Time window configuration for log-based unique value alerts
Show child attributes
LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36 The keypath in the logs to be used for unique count
"obj.field"
Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL The filter to specify which fields to include in the notification payload
["obj.field"]The maximum unique count per group by key
100
SLO threshold type definition
Show child attributes
Error budget threshold definition
Show child attributes
The rules for the error budget threshold
1 - 5 elementsShow child attributes
Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Burn rate threshold definition
Show child attributes
The rules for the burn rate threshold
1 - 5 elementsShow child attributes
Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Burn rate type dual definition
Show child attributes
Configuration for time duration
Show child attributes
The duration value
60
DURATION_UNIT_UNSPECIFIED, DURATION_UNIT_HOURS Burn rate type single definition
Show child attributes
Configuration for time duration
Show child attributes
The duration value
60
DURATION_UNIT_UNSPECIFIED, DURATION_UNIT_HOURS Keys used to group and aggregate alert data
["key1", "key2"]Show child attributes
The time in minutes before the alert can be retriggered
30
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Show child attributes
The keys to group the alerts by
["key1", "key2"]The settings for webhooks associated with the alert definition
Show child attributes
Defines the type of integration to use for notifications
Show child attributes
The integration ID for the notification
123
List of email recipients for alert notifications
Show child attributes
The list of email recipients for alert notifications
1The time in minutes before the alert can be retriggered
15
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED The destinations for notifications. (Notification Center feature)
Show child attributes
The connector ID used to send notifications
"connector_id_example"
Optional preset ID for the notification destination
"preset_id_example"
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Show child attributes
Show child attributes
the payload type for the notification
"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
Notification message configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Connector configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Show child attributes
Show child attributes
the payload type for the notification
"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
Notification message configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Connector configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Configuration for routing notifications
Show child attributes
The ID of the notification router
"123e4567-e89b-12d3-a456-426614174000"
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Additional notification groups for alerts (deprecated)
Show child attributes
The keys to group the alerts by
["key1", "key2"]The settings for webhooks associated with the alert definition
Show child attributes
Defines the type of integration to use for notifications
Show child attributes
The integration ID for the notification
123
List of email recipients for alert notifications
Show child attributes
The list of email recipients for alert notifications
1The time in minutes before the alert can be retriggered
15
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED The destinations for notifications. (Notification Center feature)
Show child attributes
The connector ID used to send notifications
"connector_id_example"
Optional preset ID for the notification destination
"preset_id_example"
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Show child attributes
Show child attributes
the payload type for the notification
"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
Notification message configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Connector configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Show child attributes
Show child attributes
the payload type for the notification
"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
Notification message configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Connector configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Configuration for routing notifications
Show child attributes
The ID of the notification router
"123e4567-e89b-12d3-a456-426614174000"
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Whether the alert is in phantom mode (creating incidents or not)
false
Whether the alert has been marked as deleted
false
Alert definition ID
"123e4567-e89b-12d3-a456-426614174000"
A successful response.
A response that contains the updated alert definition
This data structure represents an alert definition
Show child attributes
User-configurable properties of an alert definition
Show child attributes
The name of the alert definition
"My Alert"
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED, ALERT_DEF_TYPE_LOGS_THRESHOLD, ALERT_DEF_TYPE_LOGS_ANOMALY, ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD, ALERT_DEF_TYPE_LOGS_NEW_VALUE, ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT, ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD, ALERT_DEF_TYPE_METRIC_THRESHOLD, ALERT_DEF_TYPE_METRIC_ANOMALY, ALERT_DEF_TYPE_TRACING_IMMEDIATE, ALERT_DEF_TYPE_TRACING_THRESHOLD, ALERT_DEF_TYPE_FLOW, ALERT_DEF_TYPE_SLO_THRESHOLD A detailed description of what the alert monitors and when it triggers
"Alert description"
Whether the alert is currently active and monitoring
true
Defines when an alert should be active based on days of the week and time windows
Show child attributes
DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED, DAY_OF_WEEK_TUESDAY, DAY_OF_WEEK_WEDNESDAY, DAY_OF_WEEK_THURSDAY, DAY_OF_WEEK_FRIDAY, DAY_OF_WEEK_SATURDAY, DAY_OF_WEEK_SUNDAY [
"DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
"DAY_OF_WEEK_TUESDAY"
]Represents a specific time in a 24-hour format
Represents a specific time in a 24-hour format
Configuration for immediate alerts triggered on log entries matching specific filters.
Show child attributes
Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL ["obj.field"]Configuration for immediate alerts triggered on trace entries
Show child attributes
Filter configuration for tracing-based alerts
Show child attributes
Basic filter configuration using a latency threshold and label filters
Show child attributes
The latency threshold to filter traces in milliseconds
1000
Filters for application name, subsystem name, service name, operation name and span fields
Show child attributes
Filter by application names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by subsystem names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by service names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by operation names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by span fields
Show child attributes
The key of the span field to filter by
"span.field.key"
Filter type for trace entries
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Notification payload field filter
["obj.field"]Configuration for alerts triggered when log counts exceed or fall below specified thresholds
Show child attributes
The rules for the threshold alert
1 - 5 elementsShow child attributes
LogsThresholdCondition is a message that defines the condition for log-based threshold alerts.
Show child attributes
The threshold value for the alert condition
100
Time window configuration for log-based alerts
Show child attributes
LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED, LOGS_TIME_WINDOW_VALUE_MINUTES_10, LOGS_TIME_WINDOW_VALUE_MINUTES_20, LOGS_TIME_WINDOW_VALUE_MINUTES_15, LOGS_TIME_WINDOW_VALUE_MINUTES_30, LOGS_TIME_WINDOW_VALUE_HOUR_1, LOGS_TIME_WINDOW_VALUE_HOURS_2, LOGS_TIME_WINDOW_VALUE_HOURS_4, LOGS_TIME_WINDOW_VALUE_HOURS_6, LOGS_TIME_WINDOW_VALUE_HOURS_12, LOGS_TIME_WINDOW_VALUE_HOURS_24, LOGS_TIME_WINDOW_VALUE_HOURS_36 LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED, LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL Configuration for handling undetected values in alerts
Show child attributes
Should trigger the alert when undetected values are detected
true
AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED, AUTO_RETIRE_TIMEFRAME_MINUTES_5, AUTO_RETIRE_TIMEFRAME_MINUTES_10, AUTO_RETIRE_TIMEFRAME_HOUR_1, AUTO_RETIRE_TIMEFRAME_HOURS_2, AUTO_RETIRE_TIMEFRAME_HOURS_6, AUTO_RETIRE_TIMEFRAME_HOURS_12, AUTO_RETIRE_TIMEFRAME_HOURS_24 The filter to specify which fields to include in the notification payload
["obj.field"]The delay in milliseconds before evaluating the alert condition
60000
Configuration for alerts based on the ratio between two log queries
Show child attributes
Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL The rules for the ratio alert
1 - 5 elementsShow child attributes
Defines conditions for ratio-based alerts
Show child attributes
The threshold value for the alert condition
10
Time window configuration for ratio alerts
Show child attributes
LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED, LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10, LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15, LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30, LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24, LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36 LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED, LOGS_RATIO_CONDITION_TYPE_LESS_THAN Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 The alias for the numerator filter, used for display purposes
"numerator_alias"
The alias for the denominator filter, used for display purposes
"denominator_alias"
["obj.field"]LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED, LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY, LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY Configuration for handling undetected values in alerts
Show child attributes
Should trigger the alert when undetected values are detected
true
AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED, AUTO_RETIRE_TIMEFRAME_MINUTES_5, AUTO_RETIRE_TIMEFRAME_MINUTES_10, AUTO_RETIRE_TIMEFRAME_HOUR_1, AUTO_RETIRE_TIMEFRAME_HOURS_2, AUTO_RETIRE_TIMEFRAME_HOURS_6, AUTO_RETIRE_TIMEFRAME_HOURS_12, AUTO_RETIRE_TIMEFRAME_HOURS_24 The configuration for ignoring infinity values in the ratio
true
The delay in milliseconds before evaluating the alert condition
60000
Configuration for alerts that are triggered when a fixed ratio reaches a set threshold compared to a past time frame.
Show child attributes
The rules for the time-relative alert
1 - 5 elementsShow child attributes
Defines conditions for time-relative comparison alerts
Show child attributes
The threshold value for the alert condition.
LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED, LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY, LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK, LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY, LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK, LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED, LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL Ignore infinity values in the alert
true
["obj.field"]Configuration for handling undetected values in alerts
Show child attributes
Should trigger the alert when undetected values are detected
true
AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED, AUTO_RETIRE_TIMEFRAME_MINUTES_5, AUTO_RETIRE_TIMEFRAME_MINUTES_10, AUTO_RETIRE_TIMEFRAME_HOUR_1, AUTO_RETIRE_TIMEFRAME_HOURS_2, AUTO_RETIRE_TIMEFRAME_HOURS_6, AUTO_RETIRE_TIMEFRAME_HOURS_12, AUTO_RETIRE_TIMEFRAME_HOURS_24 The delay in milliseconds before evaluating the alert condition
60000
Configuration for alerts based on metric threshold violations
Show child attributes
The rules for the metric threshold alert
1 - 5 elementsShow child attributes
Defines conditions for metric threshold alerts
Show child attributes
The threshold value for the alert condition
100
The percentage of values that must exceed the threshold to trigger the alert
80
Show child attributes
METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED, METRIC_TIME_WINDOW_VALUE_MINUTES_5, METRIC_TIME_WINDOW_VALUE_MINUTES_10, METRIC_TIME_WINDOW_VALUE_MINUTES_15, METRIC_TIME_WINDOW_VALUE_MINUTES_20, METRIC_TIME_WINDOW_VALUE_MINUTES_30, METRIC_TIME_WINDOW_VALUE_HOUR_1, METRIC_TIME_WINDOW_VALUE_HOURS_2, METRIC_TIME_WINDOW_VALUE_HOURS_4, METRIC_TIME_WINDOW_VALUE_HOURS_6, METRIC_TIME_WINDOW_VALUE_HOURS_12, METRIC_TIME_WINDOW_VALUE_HOURS_24, METRIC_TIME_WINDOW_VALUE_HOURS_36 The time window as a dynamic value
"1h30m"
METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED, METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN, METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS, METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Configuration for handling missing values in metric threshold alerts.
Show child attributes
If set to true, missing values will be replaced with zero
true
If set, specifies the minimum percentage of non-null values required for the alert to be triggered
80
Configuration for handling undetected values in alerts
Show child attributes
Should trigger the alert when undetected values are detected
true
AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED, AUTO_RETIRE_TIMEFRAME_MINUTES_5, AUTO_RETIRE_TIMEFRAME_MINUTES_10, AUTO_RETIRE_TIMEFRAME_HOUR_1, AUTO_RETIRE_TIMEFRAME_HOURS_2, AUTO_RETIRE_TIMEFRAME_HOURS_6, AUTO_RETIRE_TIMEFRAME_HOURS_12, AUTO_RETIRE_TIMEFRAME_HOURS_24 The delay in milliseconds before evaluating the alert condition
60000
Configuration for alerts based on trace count thresholds
Show child attributes
Filter configuration for tracing-based alerts
Show child attributes
Basic filter configuration using a latency threshold and label filters
Show child attributes
The latency threshold to filter traces in milliseconds
1000
Filters for application name, subsystem name, service name, operation name and span fields
Show child attributes
Filter by application names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by subsystem names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by service names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by operation names
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT Filter by span fields
Show child attributes
The key of the span field to filter by
"span.field.key"
Filter type for trace entries
Show child attributes
The values of the label to filter by
1["value1", "value2"]TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, TRACING_FILTER_OPERATION_TYPE_INCLUDES, TRACING_FILTER_OPERATION_TYPE_ENDS_WITH, TRACING_FILTER_OPERATION_TYPE_STARTS_WITH, TRACING_FILTER_OPERATION_TYPE_IS_NOT The rules for the trace threshold alert.
1 elementShow child attributes
Show child attributes
The threshold value for the alert condition
100
Show child attributes
TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED, TRACING_TIME_WINDOW_VALUE_MINUTES_10, TRACING_TIME_WINDOW_VALUE_MINUTES_15, TRACING_TIME_WINDOW_VALUE_MINUTES_20, TRACING_TIME_WINDOW_VALUE_MINUTES_30, TRACING_TIME_WINDOW_VALUE_HOUR_1, TRACING_TIME_WINDOW_VALUE_HOURS_2, TRACING_TIME_WINDOW_VALUE_HOURS_4, TRACING_TIME_WINDOW_VALUE_HOURS_6, TRACING_TIME_WINDOW_VALUE_HOURS_12, TRACING_TIME_WINDOW_VALUE_HOURS_24, TRACING_TIME_WINDOW_VALUE_HOURS_36 TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED Notification payload field filter
["obj.field"]Configuration for flow-based alerts with multiple stages
Show child attributes
The stages of the flow alert.
1Show child attributes
TIMEFRAME_TYPE_UNSPECIFIED, TIMEFRAME_TYPE_UP_TO Groups of stages in a flow alert
Show child attributes
Show child attributes
The alert definitions for the flow stage group.
1Show child attributes
The alert definition ID
"123e4567-e89b-12d3-a456-426614174000"
Whether to negate the alert definition or not.
true
NEXT_OP_AND_OR_UNSPECIFIED, NEXT_OP_OR ALERTS_OP_AND_OR_UNSPECIFIED, ALERTS_OP_OR Configuration for alerts triggered by anomalous log patterns
Show child attributes
The rules for the log anomaly alert
1 elementShow child attributes
Defines conditions for detecting log anomalies
Show child attributes
The threshold value for the alert condition
10
Time window configuration for log-based alerts
Show child attributes
LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED, LOGS_TIME_WINDOW_VALUE_MINUTES_10, LOGS_TIME_WINDOW_VALUE_MINUTES_20, LOGS_TIME_WINDOW_VALUE_MINUTES_15, LOGS_TIME_WINDOW_VALUE_MINUTES_30, LOGS_TIME_WINDOW_VALUE_HOUR_1, LOGS_TIME_WINDOW_VALUE_HOURS_2, LOGS_TIME_WINDOW_VALUE_HOURS_4, LOGS_TIME_WINDOW_VALUE_HOURS_6, LOGS_TIME_WINDOW_VALUE_HOURS_12, LOGS_TIME_WINDOW_VALUE_HOURS_24, LOGS_TIME_WINDOW_VALUE_HOURS_36 LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL The filter to specify which fields to include in the notification payload
["obj.field"]The delay in milliseconds before evaluating the alert condition
60000
Common settings for anomaly-based alerts.
Show child attributes
The percentage of deviation from the baseline for triggering the alert.
Configuration for alerts triggered by anomalous metric patterns
Show child attributes
The rules for the metric anomaly alert.
1 elementShow child attributes
Show child attributes
The threshold value for the alert condition
10
Show child attributes
METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED, METRIC_TIME_WINDOW_VALUE_MINUTES_5, METRIC_TIME_WINDOW_VALUE_MINUTES_10, METRIC_TIME_WINDOW_VALUE_MINUTES_15, METRIC_TIME_WINDOW_VALUE_MINUTES_20, METRIC_TIME_WINDOW_VALUE_MINUTES_30, METRIC_TIME_WINDOW_VALUE_HOUR_1, METRIC_TIME_WINDOW_VALUE_HOURS_2, METRIC_TIME_WINDOW_VALUE_HOURS_4, METRIC_TIME_WINDOW_VALUE_HOURS_6, METRIC_TIME_WINDOW_VALUE_HOURS_12, METRIC_TIME_WINDOW_VALUE_HOURS_24, METRIC_TIME_WINDOW_VALUE_HOURS_36 The time window as a dynamic value
"1h30m"
The percentage of non-null values required to trigger the alert
10
METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED, METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL The percentage of the metric that must exceed the threshold to trigger the alert
20
The delay in milliseconds before evaluating the alert condition
60000
Common settings for anomaly-based alerts.
Show child attributes
The percentage of deviation from the baseline for triggering the alert.
Configuration for alerts triggered by new values appearing in logs
Show child attributes
The rules for the log new value alert.
1 elementShow child attributes
Defines conditions for detecting new values in logs
Show child attributes
The keypath to track for new values
"metadata.field"
Time window configuration for log-based new value alerts
Show child attributes
LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2, LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3 Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL The filter to specify which fields to include in the notification payload.
["obj.field"]Configuration for alerts based on unique value counts in logs
Show child attributes
The rules for the log unique count alert
1 elementShow child attributes
Defines conditions for unique count alerts
Show child attributes
The maximum unique count
100
Time window configuration for log-based unique value alerts
Show child attributes
LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24, LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36 The keypath in the logs to be used for unique count
"obj.field"
Filter configuration for log-based alerts
Show child attributes
Basic filter configuration using a Lucene query and label filters
Show child attributes
Filters for application name, subsystem name, and log severities
Show child attributes
Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH Show child attributes
The value of the label to filter by
"my-app"
LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED, LOG_FILTER_OPERATION_TYPE_INCLUDES, LOG_FILTER_OPERATION_TYPE_ENDS_WITH, LOG_FILTER_OPERATION_TYPE_STARTS_WITH LOG_SEVERITY_VERBOSE_UNSPECIFIED, LOG_SEVERITY_DEBUG, LOG_SEVERITY_INFO, LOG_SEVERITY_WARNING, LOG_SEVERITY_ERROR, LOG_SEVERITY_CRITICAL The filter to specify which fields to include in the notification payload
["obj.field"]The maximum unique count per group by key
100
SLO threshold type definition
Show child attributes
Error budget threshold definition
Show child attributes
The rules for the error budget threshold
1 - 5 elementsShow child attributes
Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Burn rate threshold definition
Show child attributes
The rules for the burn rate threshold
1 - 5 elementsShow child attributes
Show child attributes
ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED, ALERT_DEF_PRIORITY_P4, ALERT_DEF_PRIORITY_P3, ALERT_DEF_PRIORITY_P2, ALERT_DEF_PRIORITY_P1 Burn rate type dual definition
Show child attributes
Configuration for time duration
Show child attributes
The duration value
60
DURATION_UNIT_UNSPECIFIED, DURATION_UNIT_HOURS Burn rate type single definition
Show child attributes
Configuration for time duration
Show child attributes
The duration value
60
DURATION_UNIT_UNSPECIFIED, DURATION_UNIT_HOURS Keys used to group and aggregate alert data
["key1", "key2"]Show child attributes
The time in minutes before the alert can be retriggered
30
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Show child attributes
The keys to group the alerts by
["key1", "key2"]The settings for webhooks associated with the alert definition
Show child attributes
Defines the type of integration to use for notifications
Show child attributes
The integration ID for the notification
123
List of email recipients for alert notifications
Show child attributes
The list of email recipients for alert notifications
1The time in minutes before the alert can be retriggered
15
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED The destinations for notifications. (Notification Center feature)
Show child attributes
The connector ID used to send notifications
"connector_id_example"
Optional preset ID for the notification destination
"preset_id_example"
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Show child attributes
Show child attributes
the payload type for the notification
"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
Notification message configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Connector configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Show child attributes
Show child attributes
the payload type for the notification
"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
Notification message configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Connector configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Configuration for routing notifications
Show child attributes
The ID of the notification router
"123e4567-e89b-12d3-a456-426614174000"
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Additional notification groups for alerts (deprecated)
Show child attributes
The keys to group the alerts by
["key1", "key2"]The settings for webhooks associated with the alert definition
Show child attributes
Defines the type of integration to use for notifications
Show child attributes
The integration ID for the notification
123
List of email recipients for alert notifications
Show child attributes
The list of email recipients for alert notifications
1The time in minutes before the alert can be retriggered
15
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED The destinations for notifications. (Notification Center feature)
Show child attributes
The connector ID used to send notifications
"connector_id_example"
Optional preset ID for the notification destination
"preset_id_example"
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Show child attributes
Show child attributes
the payload type for the notification
"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
Notification message configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Connector configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Show child attributes
Show child attributes
the payload type for the notification
"slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
Notification message configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Connector configuration fields
Show child attributes
The name of the configuration field
"description"
The template for the configuration field
"template_example"
Configuration for routing notifications
Show child attributes
The ID of the notification router
"123e4567-e89b-12d3-a456-426614174000"
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED, NOTIFY_ON_TRIGGERED_AND_RESOLVED Whether the alert is in phantom mode (creating incidents or not)
false
Whether the alert has been marked as deleted
false
The alert definition's persistent ID
"123e4567-e89b-12d3-a456-426614174000"
The old alert ID
The time when the alert definition was created
"2023-10-01T12:00:00.000Z"
The time when the alert definition was last updated
"2023-10-01T12:00:00.000Z"
The last time the alert definition was triggered
"2023-10-01T12:00:00.000Z"
Was this page helpful?