metrics

package
v0.0.0-...-b68b228 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package metrics api metric

Index

Constants

View Source
const (
	// PROVIDER provider
	PROVIDER = `provider="BCS_SYSTEM"`
)

Variables

This section is empty.

Functions

func ClusterCPURequestUsage

func ClusterCPURequestUsage(c *rest.Context) (interface{}, error)

ClusterCPURequestUsage 集群 CPU 装箱率 @Summary 集群 CPU 装箱率 @Tags Metrics @Success 200 {string} string @Router /cpu_request_usage [get]

func ClusterCPUUsage

func ClusterCPUUsage(c *rest.Context) (interface{}, error)

ClusterCPUUsage 集群 CPU 使用率 @Summary 集群 CPU 使用率 @Tags Metrics @Success 200 {string} string @Router /cpu_usage [get]

func ClusterDiskUsage

func ClusterDiskUsage(c *rest.Context) (interface{}, error)

ClusterDiskUsage 集群磁盘使用率 @Summary 集群磁盘使用率 @Tags Metrics @Success 200 {string} string @Router /disk_usage [get]

func ClusterDiskioUsage

func ClusterDiskioUsage(c *rest.Context) (interface{}, error)

ClusterDiskioUsage 集群磁盘IO使用率 @Summary 集群磁盘IO使用率 @Tags Metrics @Success 200 {string} string @Router /diskio_usage [get]

func ClusterGroupMaxNodeNum

func ClusterGroupMaxNodeNum(c *rest.Context) (interface{}, error)

ClusterGroupMaxNodeNum 集群最大节点池数目 @Summary 集群最大节点池数目 @Tags Metrics @Success 200 {string} string @Router /group/:group/max_node_num [get]

func ClusterGroupNodeNum

func ClusterGroupNodeNum(c *rest.Context) (interface{}, error)

ClusterGroupNodeNum 集群节点池数目 @Summary 集群节点池数目 @Tags Metrics @Success 200 {string} string @Router /group/:group/node_num [get]

func ClusterMemoryRequestUsage

func ClusterMemoryRequestUsage(c *rest.Context) (interface{}, error)

ClusterMemoryRequestUsage 集群内存装箱率 @Summary 集群内存装箱率 @Tags Metrics @Success 200 {string} string @Router /memory_request_usage [get]

func ClusterMemoryUsage

func ClusterMemoryUsage(c *rest.Context) (interface{}, error)

ClusterMemoryUsage 集群内存使用率 @Summary 集群内存使用率 @Tags Metrics @Success 200 {string} string @Router /memory_usage [get]

func ClusterPodUsage

func ClusterPodUsage(c *rest.Context) (interface{}, error)

ClusterPodUsage 集群 POD 使用率 @Summary 集群 POD 使用率 @Tags Metrics @Success 200 {string} string @Router /pod_usage [get]

func ContainerCPULimit

func ContainerCPULimit(c *rest.Context) (interface{}, error)

ContainerCPULimit 容器 CPU 限制 @Summary 容器 CPU 限制 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/cpu_limit [GET]

func ContainerCPUUsage

func ContainerCPUUsage(c *rest.Context) (interface{}, error)

ContainerCPUUsage 容器 CPU 使用率 @Summary 容器 CPU 使用率 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/cpu_usage [GET]

func ContainerDiskReadTotal

func ContainerDiskReadTotal(c *rest.Context) (interface{}, error)

ContainerDiskReadTotal 容器磁盘读总量 @Summary 容器磁盘读总量 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/disk_read_total [GET]

func ContainerDiskWriteTotal

func ContainerDiskWriteTotal(c *rest.Context) (interface{}, error)

ContainerDiskWriteTotal 容器磁盘写总量 @Summary 容器磁盘写总量 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/disk_write_total [GET]

func ContainerMemoryLimit

func ContainerMemoryLimit(c *rest.Context) (interface{}, error)

ContainerMemoryLimit 容器内存限制 @Summary 容器内存限制 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/memory_limit [GET]

func ContainerMemoryUsed

func ContainerMemoryUsed(c *rest.Context) (interface{}, error)

ContainerMemoryUsed 容器内存使用量 @Summary 容器内存使用量 @Tags Metrics @Success 200 {string} string @Router /namespaces/namespace/pods/:pod/containers/:container/memory_used [GET]

func GetClusterOverview

func GetClusterOverview(c *rest.Context) (interface{}, error)

GetClusterOverview 集群概览数据 @Summary 集群概览数据 @Tags Metrics @Success 200 {string} string @Router /overview [get]

func GetNodeCPURequestUsage

func GetNodeCPURequestUsage(c *rest.Context) (interface{}, error)

GetNodeCPURequestUsage 查询 CPU 装箱率 @Summary 查询 CPU 装箱率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/cpu_request_usage [get]

func GetNodeCPUUsage

func GetNodeCPUUsage(c *rest.Context) (interface{}, error)

GetNodeCPUUsage 查询 CPU 使用率 @Summary 查询 CPU 使用率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/cpu_usage [get]

func GetNodeDiskUsage

func GetNodeDiskUsage(c *rest.Context) (interface{}, error)

GetNodeDiskUsage 节点磁盘使用率 @Summary 节点磁盘使用率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/disk_usage [get]

func GetNodeDiskioUsage

func GetNodeDiskioUsage(c *rest.Context) (interface{}, error)

GetNodeDiskioUsage 节点磁盘IO @Summary 节点磁盘IO @Tags Metrics @Success 200 {string} string @Router /nodes/:node/diskio_usage [get]

func GetNodeInfo

func GetNodeInfo(c *rest.Context) (interface{}, error)

GetNodeInfo 节点信息 @Summary 节点信息 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/info [get]

func GetNodeMemoryRequestUsage

func GetNodeMemoryRequestUsage(c *rest.Context) (interface{}, error)

GetNodeMemoryRequestUsage 节点内存装箱率 @Summary 节点内存装箱率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/memory_request_usage [get]

func GetNodeMemoryUsage

func GetNodeMemoryUsage(c *rest.Context) (interface{}, error)

GetNodeMemoryUsage 节点内存使用率 @Summary 节点内存使用率 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/memory_usage [get]

func GetNodeNetworkReceiveUsage

func GetNodeNetworkReceiveUsage(c *rest.Context) (interface{}, error)

GetNodeNetworkReceiveUsage 节点网络接收 @Summary 节点网络接收 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/network_transmit [get]

func GetNodeNetworkTransmitUsage

func GetNodeNetworkTransmitUsage(c *rest.Context) (interface{}, error)

GetNodeNetworkTransmitUsage 节点网络发送 @Summary 节点网络发送 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/network_receive [get]

func GetNodeOverview

func GetNodeOverview(c *rest.Context) (interface{}, error)

GetNodeOverview 查询节点概览 @Summary 查询节点概览 @Tags Metrics @Success 200 {string} string @Router /nodes/:node/overview [get]

func ListNodeOverviews

func ListNodeOverviews(c *rest.Context) (interface{}, error)

ListNodeOverviews 查询节点列表概览 @Summary 查询节点列表概览 @Tags Metrics @Success 200 {string} string @Router /nodes/overviews [post]

func PodCPULimitUsage

func PodCPULimitUsage(c *rest.Context) (interface{}, error)

PodCPULimitUsage Pod Limit CPU使用率 @Summary Pod Limit CPU使用率 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/cpu_limit_usage [POST]

func PodCPURequestUsage

func PodCPURequestUsage(c *rest.Context) (interface{}, error)

PodCPURequestUsage Pod Request CPU使用率 @Summary Pod Request CPU使用率 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/cpu_request_usage [POST]

func PodCPUUsage

func PodCPUUsage(c *rest.Context) (interface{}, error)

PodCPUUsage Pod CPU使用率 @Summary Pod CPU使用率 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/cpu_usage [POST]

func PodMemoryUsed

func PodMemoryUsed(c *rest.Context) (interface{}, error)

PodMemoryUsed Pod 内存使用量 @Summary Pod 内存使用量 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/memory_used [POST]

func PodNetworkReceive

func PodNetworkReceive(c *rest.Context) (interface{}, error)

PodNetworkReceive 网络接收量 @Summary 网络接收量 @Tags Metrics @Success 200 {string} string @Router /namespaces/:namespace/pods/network_receive [POST]

func PodNetworkTransmit

func PodNetworkTransmit(c *rest.Context) (interface{}, error)

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 Nodes

type Nodes struct {
	Node []string `json:"node"`
}

Nodes 列表

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 查询时间

Directories

Path Synopsis
Package query metric query
Package query metric query

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL