create_nrql_condition
Define a NRQL-based alert condition, attach it to a policy, and set thresholds to detect metric breaches.
Instructions
Create a NRQL alert condition
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"policy_id": "<policy_id>",
"name": "<name>",
"nrql_query": "<nrql_query>",
"threshold": "<threshold>"
},
"name": "create_nrql_condition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the alert condition | |
| priority | No | Alert priority (CRITICAL, HIGH, MEDIUM, LOW) | CRITICAL |
| policy_id | Yes | Alert policy ID to attach the condition to | |
| threshold | Yes | Alert threshold value | |
| nrql_query | Yes | NRQL query for the condition | |
| description | No | Description of the alert condition (optional) | |
| aggregation_window | No | Aggregation window in seconds (30-1200) | |
| threshold_duration | No | Duration in seconds for threshold breach (60-7200) | |
| threshold_operator | No | Threshold operator (ABOVE, BELOW, EQUAL) | ABOVE |