Alerting & Response/Alert Rules
POSTAlertingSince 1.0SynchronousAuth Required
CreateAlertInhibitionRule
Create a new inhibition rule for correlating and suppressing alerts
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
nameStringRequiredHuman-readable rule name
Example: Suppress disk alerts when host down
descriptionStringRequiredRule description
Example: Suppress disk alerts when host is unreachable
sourceMatchStringRequiredSource alert matcher expression
Example: alertname=HostDown
targetMatchStringRequiredTarget alert matcher expression
Example: alertname=DiskFull
equalLabelsStringRequiredLabels that must match between source and target
Example: host,cluster
Responses
Endpoint
POST/api/v1/alerting/inhibition-rules
/api/v1/alerting/inhibition-rules
Request Example
curl -X POST '{host}/api/v1/alerting/inhibition-rules' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"Suppress disk alerts when host down","description":"Suppress disk alerts when host is unreachable","sourceMatch":"alertname=HostDown","targetMatch":"alertname=DiskFull","equalLabels":"host,cluster"}'
Response Example
200{
"uuid": "inhib-001",
"name": "Suppress disk alerts when host down",
"description": "Suppress disk alerts when host is unreachable",
"sourceMatch": "alertname=HostDown",
"targetMatch": "alertname=DiskFull",
"equalLabels": "host,cluster",
"enabled": true,
"createDate": "example"
}Change History
This API has no change history records yet.
