Container Stats
The /detail/:cluster/container/:containerName/stats endpoint of the Dashium API provides real-time statistics for a specific Docker container.
Use this route to gather information about the container's resource utilization.
Endpointβ
- Path:
/detail/:cluster/container/:containerName/stats - Method:
GET - Parameters:
:cluster(Docker cluster identifier):containerName(Docker container name)
Responseβ
The response includes real-time statistics of the specified Docker container.
Response Exampleβ
{
"stats": {
"cpu": {
"usage": 1000000000,
"percentage": 10.0
},
"memory": {
"usage": 536870912,
"limit": 2147483648,
"percentage": 25.0
},
"network": {
"rx_bytes": 1024,
"tx_bytes": 2048
}
}
}
Exampleβ
fetch('http://your-api-url/detail/your-cluster/container/your-container/stats')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));