Skip to content

Commit

Permalink
Small update to model doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mwielgus committed Mar 23, 2016
1 parent 4e0a7a3 commit 84301de
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions docs/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
The Heapster Model is a structured representation of metrics for Kubernetes clusters, which is exposed through a set of REST API endpoints.
It allows the extraction of up to 15 minutes of historical data for any Container, Pod, Node or Namespace in the cluster, as well as the cluster itself (depending on the metric).

**Please bear in mind that this is not an official Kubernetes API, we will try to keep it stable but we don't guarantee that we won't change it in the future.**

## Usage

The Heapster Model is enabled by default. The resolution of the model can be configured through
Expand All @@ -20,16 +22,14 @@ defined, it is assumed as the zero Unix epoch time. If `end` is not defined,
then all data later than `start` will be returned.

### Cluster-level Metrics
`/api/v1/model/`: The root path of the model API, displays all browsable subpaths.

`/api/v1/model/metrics/`: Returns a list of available cluster-level metrics.

`/api/v1/model/metrics/{metric-name}?start=X&end=Y`: Returns a set of (Timestamp, Value)
pairs for the requested cluster-level metric, between the time range specified by `start` and `end`.

### Node-level Metrics
`/api/v1/model/nodes/`: Returns a list of all available nodes, along
with their latest CPU and Memory Usage values.
`/api/v1/model/nodes/`: Returns a list of all available nodes.

`/api/v1/model/nodes/{node-name}/metrics/`: Returns a list of available
node-level metrics.
Expand All @@ -38,8 +38,7 @@ node-level metrics.
pairs for the requested node-level metric, within the time range specified by `start` and `end`.

### Namespace-level Metrics
`/api/v1/model/namespaces/`: Returns a list of all available namespaces, along
with their latest CPU and Memory Usage values.
`/api/v1/model/namespaces/`: Returns a list of all available namespaces.

`/api/v1/model/namespaces/{namespace-name}/metrics/`: Returns a list of available namespace-level metrics.

Expand All @@ -48,8 +47,7 @@ pairs for the requested namespace-level metric, within the time range specified


### Pod-level Metrics
`/api/v1/model/namespaces/{namespace-name}/pods/`: Returns a list of all available pods under a given namespace, along
with their latest CPU and Memory Usage values.
`/api/v1/model/namespaces/{namespace-name}/pods/`: Returns a list of all available pods under a given namespace.

`/api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/metrics/`: Returns a list of available pod-level metrics

Expand All @@ -60,16 +58,14 @@ pairs for the requested pod-level metric, within the time range specified by `st
Container metrics and stats are accessible for both containers that belong to
pods, as well as for free containers running in each node.

`/api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/containers/`: Returns a list of all available containers under a given pod, along
with their latest CPU and Memory Usage values.
`/api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/containers/`: Returns a list of all available containers under a given pod.

`/api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/containers/{container-name}/metrics/`: Returns a list of available container-level metrics

`/api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/containers/{container-name}/metrics/{metric-name}?start=X&end=Y`: Returns a set of (Timestamp, Value)
pairs for the requested container-level metric, within the time range specified by `start` and `end`.

`/api/v1/model/nodes/{node-name}/freecontainers/`: Returns a list of all available free containers under a given node, along
with their latest CPU and Memory Usage values.
`/api/v1/model/nodes/{node-name}/freecontainers/`: Returns a list of all available free containers under a given node.

`/api/v1/model/nodes/{node-name}/freecontainers/{container-name}/metrics/`: Returns a list of available container-level metrics

Expand Down

0 comments on commit 84301de

Please sign in to comment.