- Home
- API Enriched
- Statistics
- alert
- GET Alert Policy Match.
GET Alert Policy Match.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/alert/namespaces/example/alert_policy/match';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"labels":{},"namespace":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace
x-required The namespace in which the configuration object is present.
Request Bodyrequired
Section titled “Request Bodyrequired”Request message for GetAlertPolicyMatch RPC, describing alert to match against alert policies.
object
“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
The namespace in which the configuration object is present Required: YES.
Examplegenerated
{ "labels": {}, "namespace": "example"}Responses
Section titled “Responses”A successful response.
Response of matching Alert Policies from GET Alert Policy Match request.
object
X-example:{“alert_match”:[{“policy_name”:“policy1”,“policy_active”:1},{“policy_name”:“policy4”}]} List of Alert Policies that match given requested namespace,labels.
Alert Policy info that matches AlertPolicyMatchRequest giving alert policy name, alert policy activation state.
object
Human-readable name for the resource
Example
{ "alert_match": [ { "policy_status": "INACTIVE" } ]}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example