Skip to content

GET Alert Policy Match.

POST
/api/alert/namespaces/{namespace}/alert_policy/match
curl --request POST \
--url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/alert/namespaces/example/alert_policy/match \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "labels": {}, "namespace": "example" }'

GET Alert Policies that match to a set of alert labels for a namespace.

Examples of this operation.

namespace
required
string

Namespace

x-required The namespace in which the configuration object is present.

Media typeapplication/json
Alert Policy Match Request

Request message for GetAlertPolicyMatch RPC, describing alert to match against alert policies.

object
labels
labels

“namespace”: “system”, “tenant” :“tenant2”, “alertname”: “podXcrash”, “group”: “IaaS”, “severity”: “critical” }, Alert labels to find match against alert policies requires tenant and namespace to be defined labels map Required: YES.

object
namespace
namespace

The namespace in which the configuration object is present Required: YES.

string
>= 6 characters <= 1024 characters
Examplegenerated
{
"labels": {},
"namespace": "example"
}

A successful response.

Media typeapplication/json
Alert Policy Match Response

Response of matching Alert Policies from GET Alert Policy Match request.

object
alert_match
alert_match

X-example:{“alert_match”:[{“policy_name”:“policy1”,“policy_active”:1},{“policy_name”:“policy4”}]} List of Alert Policies that match given requested namespace,labels.

Array<object>
Alert Policy Match

Alert Policy info that matches AlertPolicyMatchRequest giving alert policy name, alert policy activation state.

object
policy_name
policy_name

Human-readable name for the resource

string
<= 1024 characters
policy_status
string
default: INACTIVE
Allowed values: INACTIVE ACTIVE
Example
{
"alert_match": [
{
"policy_status": "INACTIVE"
}
]
}

Returned when operation is not authorized.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when there is no permission to access resource.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when resource is not found.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation on resource is conflicting with current value.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation has been rejected as it is happening too frequently.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server encountered an error in processing API.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when service is unavailable temporarily.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server timed out processing request.

Media typeapplication/json
string format: string
Examplegenerated
example