List Alertmanager silences
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences \
--header 'Authorization: Bearer <token>'{
"alertmanager": {
"namespace": "<string>",
"service": "<string>",
"port": 123
},
"state": "<string>",
"silences": [
{
"id": "<string>",
"state": "<string>",
"matchers": [
{
"name": "<string>",
"value": "<string>",
"is_regex": false
}
],
"starts_at": "<string>",
"ends_at": "<string>",
"created_by": "<string>",
"comment": "<string>"
}
],
"count": 123
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}Alerts
List Alertmanager silences
Lists the silences on the cluster’s in-cluster Alertmanager, newest ending first, read through the cluster agent. The Alertmanager is discovered by its prometheus-operator or chart labels unless namespace and service name it. Requires clusters.read at the cluster, the visibility the assistant’s list_alertmanager_silences tool relies on.
GET
/
api
/
v1
/
clusters
/
{cluster_id}
/
alertmanager
/
silences
List Alertmanager silences
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences \
--header 'Authorization: Bearer <token>'{
"alertmanager": {
"namespace": "<string>",
"service": "<string>",
"port": 123
},
"state": "<string>",
"silences": [
{
"id": "<string>",
"state": "<string>",
"matchers": [
{
"name": "<string>",
"value": "<string>",
"is_regex": false
}
],
"starts_at": "<string>",
"ends_at": "<string>",
"created_by": "<string>",
"comment": "<string>"
}
],
"count": 123
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Silence state to list; all lists every silence Alertmanager still holds.
Available options:
active, pending, expired, all Namespace of the Alertmanager Service. Alone it narrows discovery to that namespace; with service it skips discovery.
Name of the Alertmanager Service, for installs discovery does not find. Needs namespace.
Port Alertmanager listens on.
Required range:
1 <= x <= 65535