Skip to main content

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));