Documentation ¶
Overview ¶
Package metrics api metric
Index ¶
- Constants
- func ClusterCPURequestUsage(c *rest.Context) (interface{}, error)
- func ClusterCPUUsage(c *rest.Context) (interface{}, error)
- func ClusterDiskUsage(c *rest.Context) (interface{}, error)
- func ClusterDiskioUsage(c *rest.Context) (interface{}, error)
- func ClusterGroupMaxNodeNum(c *rest.Context) (interface{}, error)
- func ClusterGroupNodeNum(c *rest.Context) (interface{}, error)
- func ClusterMemoryRequestUsage(c *rest.Context) (interface{}, error)
- func ClusterMemoryUsage(c *rest.Context) (interface{}, error)
- func ClusterPodUsage(c *rest.Context) (interface{}, error)
- func ContainerCPULimit(c *rest.Context) (interface{}, error)
- func ContainerCPUUsage(c *rest.Context) (interface{}, error)
- func ContainerDiskReadTotal(c *rest.Context) (interface{}, error)
- func ContainerDiskWriteTotal(c *rest.Context) (interface{}, error)
- func ContainerMemoryLimit(c *rest.Context) (interface{}, error)
- func ContainerMemoryUsed(c *rest.Context) (interface{}, error)
- func GetClusterOverview(c *rest.Context) (interface{}, error)
- func GetNodeCPURequestUsage(c *rest.Context) (interface{}, error)
- func GetNodeCPUUsage(c *rest.Context) (interface{}, error)
- func GetNodeDiskUsage(c *rest.Context) (interface{}, error)
- func GetNodeDiskioUsage(c *rest.Context) (interface{}, error)
- func GetNodeInfo(c *rest.Context) (interface{}, error)
- func GetNodeMemoryRequestUsage(c *rest.Context) (interface{}, error)
- func GetNodeMemoryUsage(c *rest.Context) (interface{}, error)
- func GetNodeNetworkReceiveUsage(c *rest.Context) (interface{}, error)
- func GetNodeNetworkTransmitUsage(c *rest.Context) (interface{}, error)
- func GetNodeOverview(c *rest.Context) (interface{}, error)
- func ListNodeOverviews(c *rest.Context) (interface{}, error)
- func PodCPULimitUsage(c *rest.Context) (interface{}, error)
- func PodCPURequestUsage(c *rest.Context) (interface{}, error)
- func PodCPUUsage(c *rest.Context) (interface{}, error)
- func PodMemoryUsed(c *rest.Context) (interface{}, error)
- func PodNetworkReceive(c *rest.Context) (interface{}, error)
- func PodNetworkTransmit(c *rest.Context) (interface{}, error)
- type ContainerUsageQuery
- type NodeOveriewMetric
- type Nodes
- type PodUsageQuery
- type UsageQuery
Constants ¶
const (
// PROVIDER provider
PROVIDER = `provider="BCS_SYSTEM"`
)
Variables ¶
This section is empty.
Functions ¶
func ClusterCPURequestUsage ¶
ClusterCPURequestUsage 集群 CPU 装箱率 @Summary 集群 CPU 装箱率 @Tags Metrics @Success 200 {string} string @Router /cpu_request_usage [get]
func ClusterCPUUsage ¶
ClusterCPUUsage 集群 CPU 使用率 @Summary 集群 CPU 使用率 @Tags Metrics @Success 200 {string} string @Router /cpu_usage [get]
func ClusterDiskUsage ¶
ClusterDiskUsage 集群磁盘使用率 @Summary 集群磁盘使用率 @Tags Metrics @Success 200 {string} string @Router /disk_usage [get]
func ClusterDiskioUsage ¶
ClusterDiskioUsage 集群磁盘IO使用率 @Summary 集群磁盘IO使用率 @Tags Metrics @Success 200 {string} string @Router /diskio_usage [get]
func ClusterGroupMaxNodeNum ¶
ClusterGroupMaxNodeNum 集群最大节点池数目 @Summary 集群最大节点池数目 @Tags Metrics @Success 200 {string} string @Router /group/:group/max_node_num [get]
func ClusterGroupNodeNum ¶
ClusterGroupNodeNum 集群节点池数目 @Summary 集群节点池数目 @Tags Metrics @Success 200 {string} string @Router /group/:group/node_num [get]
func ClusterMemoryRequestUsage ¶
ClusterMemoryRequestUsage 集群内存装箱率 @Summary 集群内存装箱率 @Tags Metrics @Success 200 {string} string @Router /memory_request_usage [get]
func ClusterMemoryUsage ¶
ClusterMemoryUsage 集群内存使用率 @Summary 集群内存使用率 @Tags Metrics @Success 200 {string} string @Router /memory_usage [get]
func ClusterPodUsage ¶
ClusterPodUsage 集群 POD 使用率 @Summary 集群 POD 使用率 @Tags Metrics @Success 200 {string} string @Router /pod_usage [get]
func ContainerCPULimit ¶
ContainerCPULimit 容器 CPU 限制 @Summary 容器 CPU 限制 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/cpu_limit [GET]
func ContainerCPUUsage ¶
ContainerCPUUsage 容器 CPU 使用率 @Summary 容器 CPU 使用率 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/cpu_usage [GET]
func ContainerDiskReadTotal ¶
ContainerDiskReadTotal 容器磁盘读总量 @Summary 容器磁盘读总量 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/disk_read_total [GET]
func ContainerDiskWriteTotal ¶
ContainerDiskWriteTotal 容器磁盘写总量 @Summary 容器磁盘写总量 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/disk_write_total [GET]
func ContainerMemoryLimit ¶
ContainerMemoryLimit 容器内存限制 @Summary 容器内存限制 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/memory_limit [GET]
func ContainerMemoryUsed ¶
ContainerMemoryUsed 容器内存使用量 @Summary 容器内存使用量 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/memory_used [GET]
func GetClusterOverview ¶
GetClusterOverview 集群概览数据 @Summary 集群概览数据 @Tags Metrics @Success 200 {string} string @Router /overview [get]
func GetNodeCPURequestUsage ¶
GetNodeCPURequestUsage 查询 CPU 装箱率 @Summary 查询 CPU 装箱率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/cpu_request_usage [get]
func GetNodeCPUUsage ¶
GetNodeCPUUsage 查询 CPU 使用率 @Summary 查询 CPU 使用率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/cpu_usage [get]
func GetNodeDiskUsage ¶
GetNodeDiskUsage 节点磁盘使用率 @Summary 节点磁盘使用率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/disk_usage [get]
func GetNodeDiskioUsage ¶
GetNodeDiskioUsage 节点磁盘IO @Summary 节点磁盘IO @Tags Metrics @Success 200 {string} string @Router /nodes/:node/diskio_usage [get]
func GetNodeInfo ¶
GetNodeInfo 节点信息 @Summary 节点信息 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/info [get]
func GetNodeMemoryRequestUsage ¶
GetNodeMemoryRequestUsage 节点内存装箱率 @Summary 节点内存装箱率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/memory_request_usage [get]
func GetNodeMemoryUsage ¶
GetNodeMemoryUsage 节点内存使用率 @Summary 节点内存使用率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/memory_usage [get]
func GetNodeNetworkReceiveUsage ¶
GetNodeNetworkReceiveUsage 节点网络接收 @Summary 节点网络接收 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/network_transmit [get]
func GetNodeNetworkTransmitUsage ¶
GetNodeNetworkTransmitUsage 节点网络发送 @Summary 节点网络发送 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/network_receive [get]
func GetNodeOverview ¶
GetNodeOverview 查询节点概览 @Summary 查询节点概览 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/overview [get]
func ListNodeOverviews ¶
ListNodeOverviews 查询节点列表概览 @Summary 查询节点列表概览 @Tags Metrics @Success 200 {string} string @Router /nodes/overviews [post]
func PodCPULimitUsage ¶
PodCPULimitUsage Pod Limit CPU使用率 @Summary Pod Limit CPU使用率 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/cpu_limit_usage [POST]
func PodCPURequestUsage ¶
PodCPURequestUsage Pod Request CPU使用率 @Summary Pod Request CPU使用率 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/cpu_request_usage [POST]
func PodCPUUsage ¶
PodCPUUsage Pod CPU使用率 @Summary Pod CPU使用率 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/cpu_usage [POST]
func PodMemoryUsed ¶
PodMemoryUsed Pod 内存使用量 @Summary Pod 内存使用量 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/memory_used [POST]
func PodNetworkReceive ¶
PodNetworkReceive 网络接收量 @Summary 网络接收量 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/network_receive [POST]
func PodNetworkTransmit ¶
PodNetworkTransmit Pod 网络发送量 @Summary Pod 网络发送量 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/network_transmit [POST]
Types ¶
type ContainerUsageQuery ¶
type ContainerUsageQuery struct { UsageQuery `json:",inline"` Namespace string `json:"namespace"` PodName string `json:"pod_name"` ContainerName string `json:"container_name"` }
ContainerUsageQuery 容器查询参数
type NodeOveriewMetric ¶
type NodeOveriewMetric struct { ContainerCount string `json:"container_count"` PodTotal string `json:"pod_total"` PodCount string `json:"pod_count"` CPUUsed string `json:"cpu_used"` CPURequest string `json:"cpu_request"` CPUTotal string `json:"cpu_total"` CPUUsage string `json:"cpu_usage"` CPURequestUsage string `json:"cpu_request_usage"` DiskUsed string `json:"disk_used"` DiskTotal string `json:"disk_total"` DiskUsage string `json:"disk_usage"` DiskioUsage string `json:"diskio_usage"` MemoryUsed string `json:"memory_used"` MemoryRequest string `json:"memory_request"` MemoryTotal string `json:"memory_total"` MemoryUsage string `json:"memory_usage"` MemoryRequestUsage string `json:"memory_request_usage"` }
NodeOveriewMetric 节点概览
type PodUsageQuery ¶
type PodUsageQuery struct { UsageQuery `json:",inline"` PodNameList []string `json:"pod_name_list"` }
PodUsageQuery Pod 查询
type UsageQuery ¶
type UsageQuery struct { StartAt string `json:"start_at" form:"start_at"` // 必填参数` EndAt string `json:"end_at" form:"end_at"` }
UsageQuery 节点查询
func (*UsageQuery) GetQueryTime ¶
func (q *UsageQuery) GetQueryTime() (*clientutil.PromQueryTime, error)
GetQueryTime 转换为 promql 查询时间