Count cluster log lines per interval and level (browser session)
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/volume"
payload = { "step_seconds": 11 }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({step_seconds: 11})
};
fetch('https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/volume', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/volume \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"step_seconds": 11
}
'{
"provider": "<string>",
"source": "<string>",
"note": "<string>",
"cluster_attribution": {},
"start": "<string>",
"end": "<string>",
"step_seconds": 123,
"exact": true,
"kept_days": 123,
"buckets": [
{
"start": "<string>",
"total": 123,
"levels": {
"error": 123,
"warn": 123,
"info": 123,
"debug": 123,
"other": 123
}
}
]
}Clusters
Count cluster log lines per interval and level (browser session)
Session-authenticated count of the cluster’s log lines per step and severity, counted by the store the history query reads. Requires kubernetes.logs on this cluster. A store that fails or refuses answers an error, never empty bars.
POST
/
org
/
clusters
/
imported
/
{cluster_id}
/
logs
/
volume
Count cluster log lines per interval and level (browser session)
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/volume"
payload = { "step_seconds": 11 }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({step_seconds: 11})
};
fetch('https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/volume', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/volume \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"step_seconds": 11
}
'{
"provider": "<string>",
"source": "<string>",
"note": "<string>",
"cluster_attribution": {},
"start": "<string>",
"end": "<string>",
"step_seconds": 123,
"exact": true,
"kept_days": 123,
"buckets": [
{
"start": "<string>",
"total": 123,
"levels": {
"error": 123,
"warn": 123,
"info": 123,
"debug": 123,
"other": 123
}
}
]
}Authorizations
Body
application/json
Response
Line counts per bar and level