Heapster
用法Heapster在openshift和k8s中默认使用,使用标签--metric_resolution可以设置数据存储周期,默认存储周期是60秒。所有端点/metrics/{metric-name}/可以接收start和end参数,这两个参数指定了开始和结束时间序列,时间设置格式是字符串类型编码成RFC3339.类型,如该开始时间没有设定,默认值为0,如该结束时间没有设定,默认值为开始时间以后
·
1.用法
Heapster在openshift和k8s中默认使用,使用标签–metric_resolution可以设置数据存储周期,默认存储周期是60秒。
所有端点/metrics/{metric-name}/可以接收start和end参数,这两个参数指定了开始和结束时间序列,时间设置格式是字符串类型编码成RFC3339.类型,如该开始时间没有设定,默认值为0,如该结束时间没有设定,默认值为开始时间以后的所有数据。
2.Cluster 集群级的度量
- /api/v1/model/metrics/ 返回一个集群级可度量列表。
- /api/v1/model/metrics/{metric-name}?start=X&end=Y 返回一个设着李时间对的度量。
- -
3.Node 节点级的度量
- /api/v1/model/nodes/ 返回一个节点可度量列表。
- /api/v1/model/nodes/{node-name}/metrics/ 返回某个node节点上,可度量的资源列表,比如cpu、memory、network等。
- /api/v1/model/nodes/{node-name}/metrics/{metric-name}?start=X&end=Y 返回设置了起始时间对的资源度量信息。
4.Namespace 命名空间级的度量
- /api/v1/model/namespaces/ 返回一个可度量的namespace列表
- /api/v1/model/namespaces/{namespace-name}/metrics/ 返回某个namespace上,可度量的资源列表,比如cpu、memory等。
- /api/v1/model/namespaces/{namespace-name}/metrics/{metric-name}?start=X&end=Y 返回一个带有时间对的某个namespace下某种资源的度量信息。
5.Pod 级别的度量
- /api/v1/model/namespaces/{namespace-name}/pods/ 返回某个命名空间下可度量的pod列表
- /api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/metrics/ 返回某个命名空间下指定pod的可度量资源列表,比如CPU、memory
- /api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/metrics/{metric-name}?start=X&end=Y 返回某个pod的指定资源的度量情况。
6.Container 容器级别的度量
- /api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/containers/ 返回一个可度量的容器列表
- /api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/containers/{container-name}/metrics/ 返回一个容器可度量的资源列表,比如CPU
- /api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/containers/{container-name}/metrics/{metric-name}?start=X&end=Y 容器的某个资源在某个时间对内的度量情况。
-
- /api/v1/model/nodes/{node-name}/freecontainers/ 返回一个node上可度量的免费容器(系统容器)列表
- /api/v1/model/nodes/{node-name}/freecontainers/{container-name}/metrics/ 返回一个node上可度量的免费容器(系统容器)列表的资源类型。
- /api/v1/model/nodes/{node-name}/freecontainers/{container-name}/metrics/{metric-name}?start=X&end=Y 返回一个时间对内的容器资源监控信息。
7.Heapster可以输出的metrics类型:
Metric Name | Description |
---|---|
cpu/limit | CPU hard limit in millicores. |
cpu/node_capacity | Cpu capacity of a node. |
cpu/node_allocatable | Cpu allocatable of a node. |
cpu/node_reservation | Share of cpu that is reserved on the node allocatable. |
cpu/node_utilization | CPU utilization as a share of node allocatable. |
cpu/request | CPU request (the guaranteed amount of resources) in millicores. |
cpu/usage | Cumulative CPU usage on all cores. |
cpu/usage_rate | CPU usage on all cores in millicores. |
filesystem/usage | Total number of bytes consumed on a filesystem. |
filesystem/limit | The total size of filesystem in bytes. |
filesystem/available | The number of available bytes remaining in a the filesystem |
filesystem/inodes | The number of available inodes in a the filesystem |
filesystem/inodes_free | The number of free inodes remaining in a the filesystem |
memory/limit | Memory hard limit in bytes. |
memory/major_page_faults | Number of major page faults. |
memory/major_page_faults_rate | Number of major page faults per second. |
memory/node_capacity | Memory capacity of a node. |
memory/node_allocatable | Memory allocatable of a node. |
memory/node_reservation | Share of memory that is reserved on the node allocatable. |
memory/node_utilization | Memory utilization as a share of memory allocatable. |
memory/page_faults | Number of page faults. |
memory/page_faults_rate | Number of page faults per second. |
memory/request | Memory request (the guaranteed amount of resources) in bytes. |
memory/usage | Total memory usage. |
memory/cache | Cache memory usage. |
memory/rss | RSS memory usage. |
memory/working_set | Total working set usage. Working set is the memory being used and not easily dropped by the kernel. |
network/rx | Cumulative number of bytes received over the network. |
network/rx_errors | Cumulative number of errors while receiving over the network. |
network/rx_errors_rate | Number of errors while receiving over the network per second. |
network/rx_rate | Number of bytes received over the network per second. |
network/tx | Cumulative number of bytes sent over the network |
network/tx_errors | Cumulative number of errors while sending over the network |
network/tx_errors_rate | Number of errors while sending over the network |
network/tx_rate | Number of bytes sent over the network per second. |
uptime | Number of milliseconds since the container was started. |
更多推荐
已为社区贡献4条内容
所有评论(0)