curl --request PUT \
--url https://api.qovery.com/alert-rules/{alertRuleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"tag": "<string>",
"condition": {
"kind": "CUSTOM",
"promql": "<string>",
"operator": "NONE",
"threshold": 123,
"function": "NONE"
},
"for_duration": "<string>",
"severity": "LOW",
"enabled": true,
"alert_receiver_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"presentation": {
"summary": "<string>",
"runbook_url": "<string>"
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"source": "MANAGED",
"name": "<string>",
"state": "UNDEPLOYED",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"tag": "<string>",
"condition": {
"kind": "CUSTOM",
"promql": "<string>",
"operator": "NONE",
"threshold": 123,
"function": "NONE"
},
"for_duration": "<string>",
"severity": "LOW",
"enabled": true,
"alert_receiver_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"presentation": {
"summary": "<string>",
"runbook_url": "<string>"
},
"target": {
"target_type": " CLUSTER",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"icon_uri": "<string>",
"service_type": "APPLICATION",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_type": "CRON"
}
},
"is_up_to_date": true,
"updated_at": "2023-11-07T05:31:56Z",
"starts_at": "2023-11-07T05:31:56Z"
}Update an existing alert rule
curl --request PUT \
--url https://api.qovery.com/alert-rules/{alertRuleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"tag": "<string>",
"condition": {
"kind": "CUSTOM",
"promql": "<string>",
"operator": "NONE",
"threshold": 123,
"function": "NONE"
},
"for_duration": "<string>",
"severity": "LOW",
"enabled": true,
"alert_receiver_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"presentation": {
"summary": "<string>",
"runbook_url": "<string>"
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"source": "MANAGED",
"name": "<string>",
"state": "UNDEPLOYED",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"tag": "<string>",
"condition": {
"kind": "CUSTOM",
"promql": "<string>",
"operator": "NONE",
"threshold": 123,
"function": "NONE"
},
"for_duration": "<string>",
"severity": "LOW",
"enabled": true,
"alert_receiver_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"presentation": {
"summary": "<string>",
"runbook_url": "<string>"
},
"target": {
"target_type": " CLUSTER",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"icon_uri": "<string>",
"service_type": "APPLICATION",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_type": "CRON"
}
},
"is_up_to_date": true,
"updated_at": "2023-11-07T05:31:56Z",
"starts_at": "2023-11-07T05:31:56Z"
}JWT tokens should be used with OIDC account (human to machine). JWT tokens used by the Qovery console to communicate with the API have a TTL. Curl Example ' curl https://console.qovery.com/organization -H "Authorization: Bearer $qovery_token" '
Alert Rule ID
Name of the alert rule
Description of what the alert monitors
Show child attributes
Duration the condition must be true before firing (ISO-8601 duration format)
Alert severity level: - LOW: Minor issues or informational alerts that don't require immediate attention. Can be addressed during normal business hours. - MEDIUM: Moderate issues that should be investigated soon but don't impact critical services. May cause degraded performance or minor service disruption. - HIGH: Serious issues affecting service quality or availability. Requires prompt attention and resolution within hours. - CRITICAL: Critical issue requiring immediate action. Service outage, data loss risk, or severe performance degradation affecting users.
LOW, MEDIUM, HIGH, CRITICAL Whether the alert rule is enabled
List of alert receiver IDs to send notifications to
1Show child attributes
OK
Base schema for alert rule responses with discriminator
Source of the alert rule:
MANAGED, GHOST Name of the alert rule
UNDEPLOYED, OK, TRIGGERED, PENDING_NOTIFICATION, NOTIFIED, SUPPRESSED, UNROUTED Organization identifier
Cluster identifier
Description of what the alert monitors
Show child attributes
Duration the condition must be true before firing (ISO-8601 duration format)
Alert severity level: - LOW: Minor issues or informational alerts that don't require immediate attention. Can be addressed during normal business hours. - MEDIUM: Moderate issues that should be investigated soon but don't impact critical services. May cause degraded performance or minor service disruption. - HIGH: Serious issues affecting service quality or availability. Requires prompt attention and resolution within hours. - CRITICAL: Critical issue requiring immediate action. Service outage, data loss risk, or severe performance degradation affecting users.
LOW, MEDIUM, HIGH, CRITICAL Whether the alert rule is enabled
List of alert receiver IDs to send notifications to
Show child attributes
Show child attributes
Indicates whether the current version of the alert has been synced with the alerting system. If false, an outdated version is currently deployed.
when the alert starts firing
Was this page helpful?