prometheus

package
v0.0.0-...-86d5f22 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package prometheus prometheus

Index

Constants

View Source
const (
	// DiskFstype xxx
	DiskFstype = "ext[234]|btrfs|xfs|zfs" // 磁盘统计 允许的文件系统
	// DiskMountpoint xxx
	DiskMountpoint = "/data" // 磁盘统计 允许的挂载目录
	// PROVIDER xxx 查询限制
	PROVIDER = `prometheus=~"thanos/po-kube-prometheus-stack-prometheus|thanos/po-prometheus-operator-prometheus"`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Prometheus

type Prometheus struct {
}

Prometheus xxx

func NewPrometheus

func NewPrometheus() *Prometheus

NewPrometheus xxx

func (*Prometheus) GetClusterCPURequest

func (m *Prometheus) GetClusterCPURequest(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterCPURequest 获取CPU Request使用量

func (*Prometheus) GetClusterCPURequestUsage

func (m *Prometheus) GetClusterCPURequestUsage(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterCPURequestUsage 获取CPU核心装箱率

func (*Prometheus) GetClusterCPUTotal

func (m *Prometheus) GetClusterCPUTotal(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterCPUTotal 获取集群CPU核心总量

func (*Prometheus) GetClusterCPUUsage

func (m *Prometheus) GetClusterCPUUsage(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterCPUUsage 获取CPU核心使用量

func (*Prometheus) GetClusterCPUUsed

func (m *Prometheus) GetClusterCPUUsed(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterCPUUsed 获取CPU核心使用量

func (*Prometheus) GetClusterDiskTotal

func (m *Prometheus) GetClusterDiskTotal(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterDiskTotal 获取集群磁盘总量

func (*Prometheus) GetClusterDiskUsage

func (m *Prometheus) GetClusterDiskUsage(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterDiskUsage 获取CPU核心使用量

func (*Prometheus) GetClusterDiskUsed

func (m *Prometheus) GetClusterDiskUsed(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterDiskUsed 获取集群磁盘使用量

func (*Prometheus) GetClusterDiskioTotal

func (m *Prometheus) GetClusterDiskioTotal(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterDiskioTotal 集群磁盘IO

func (*Prometheus) GetClusterDiskioUsage

func (m *Prometheus) GetClusterDiskioUsage(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterDiskioUsage 集群磁盘IO使用率

func (*Prometheus) GetClusterDiskioUsed

func (m *Prometheus) GetClusterDiskioUsed(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterDiskioUsed 集群磁盘IO使用量

func (*Prometheus) GetClusterGroupMaxNodeNum

func (m *Prometheus) GetClusterGroupMaxNodeNum(ctx context.Context, projectID, clusterID, group string, start,
	end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterGroupMaxNodeNum 集群最大节点池数目

func (*Prometheus) GetClusterGroupNodeNum

func (m *Prometheus) GetClusterGroupNodeNum(ctx context.Context, projectID, clusterID, group string, start,
	end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterGroupNodeNum 集群节点池数目

func (*Prometheus) GetClusterMemoryRequest

func (m *Prometheus) GetClusterMemoryRequest(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterMemoryRequest 获取内存 Request

func (*Prometheus) GetClusterMemoryRequestUsage

func (m *Prometheus) GetClusterMemoryRequestUsage(ctx context.Context, projectID, clusterID string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterMemoryRequestUsage 获取内存装箱率

func (*Prometheus) GetClusterMemoryTotal

func (m *Prometheus) GetClusterMemoryTotal(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterMemoryTotal 获取集群内存总量

func (*Prometheus) GetClusterMemoryUsage

func (m *Prometheus) GetClusterMemoryUsage(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterMemoryUsage 获取内存使用率

func (*Prometheus) GetClusterMemoryUsed

func (m *Prometheus) GetClusterMemoryUsed(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterMemoryUsed 获取内存使用量

func (*Prometheus) GetClusterPodTotal

func (m *Prometheus) GetClusterPodTotal(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterPodTotal 获取集群最大允许pod数

func (*Prometheus) GetClusterPodUsage

func (m *Prometheus) GetClusterPodUsage(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterPodUsage 获取集群pod使用率

func (*Prometheus) GetClusterPodUsed

func (m *Prometheus) GetClusterPodUsed(ctx context.Context, projectID, clusterID string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetClusterPodUsed 获取集群pod使用量

func (*Prometheus) GetContainerCPULimit

func (m *Prometheus) GetContainerCPULimit(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerCPULimit 容器CPU限制

func (*Prometheus) GetContainerCPUUsage

func (m *Prometheus) GetContainerCPUUsage(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerCPUUsage 容器CPU使用率

func (*Prometheus) GetContainerDiskReadTotal

func (m *Prometheus) GetContainerDiskReadTotal(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerDiskReadTotal 容器磁盘读

func (*Prometheus) GetContainerDiskWriteTotal

func (m *Prometheus) GetContainerDiskWriteTotal(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerDiskWriteTotal 容器磁盘写

func (*Prometheus) GetContainerGPUMemoryUsage

func (m *Prometheus) GetContainerGPUMemoryUsage(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerGPUMemoryUsage 容器GPU显卡使用率

func (*Prometheus) GetContainerGPUUsage

func (m *Prometheus) GetContainerGPUUsage(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerGPUUsage 容器GPU使用率

func (*Prometheus) GetContainerGPUUsed

func (m *Prometheus) GetContainerGPUUsed(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerGPUUsed 容器GPU使用量

func (*Prometheus) GetContainerMemoryLimit

func (m *Prometheus) GetContainerMemoryLimit(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerMemoryLimit 容器内存限制

func (*Prometheus) GetContainerMemoryUsed

func (m *Prometheus) GetContainerMemoryUsed(ctx context.Context, projectID, clusterID, namespace, podname string,
	containerNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetContainerMemoryUsed 容器内存使用率

func (*Prometheus) GetNodeCPURequest

func (m *Prometheus) GetNodeCPURequest(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeCPURequest 节点CPU请求量

func (*Prometheus) GetNodeCPURequestUsage

func (m *Prometheus) GetNodeCPURequestUsage(ctx context.Context, projectID, clusterID, nodeName string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeCPURequestUsage 节点CPU装箱率

func (*Prometheus) GetNodeCPUTotal

func (m *Prometheus) GetNodeCPUTotal(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeCPUTotal 节点CPU总量

func (*Prometheus) GetNodeCPUUsage

func (m *Prometheus) GetNodeCPUUsage(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeCPUUsage 节点CPU使用率

func (*Prometheus) GetNodeCPUUsed

func (m *Prometheus) GetNodeCPUUsed(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeCPUUsed 节点CPU使用量

func (*Prometheus) GetNodeContainerCount

func (m *Prometheus) GetNodeContainerCount(ctx context.Context, projectID, clusterID, nodeName string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeContainerCount 容器数量

func (*Prometheus) GetNodeDiskTotal

func (m *Prometheus) GetNodeDiskTotal(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeDiskTotal 节点磁盘总量

func (*Prometheus) GetNodeDiskUsage

func (m *Prometheus) GetNodeDiskUsage(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeDiskUsage 节点磁盘使用率

func (*Prometheus) GetNodeDiskUsed

func (m *Prometheus) GetNodeDiskUsed(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeDiskUsed 节点磁盘使用量

func (*Prometheus) GetNodeDiskioUsage

func (m *Prometheus) GetNodeDiskioUsage(ctx context.Context, projectID, clusterID, nodeName string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeDiskioUsage 接触磁盘IO使用率

func (*Prometheus) GetNodeInfo

func (m *Prometheus) GetNodeInfo(ctx context.Context, projectID, clusterID, nodeName string, t time.Time) (
	*base.NodeInfo, error)

GetNodeInfo 节点信息

func (*Prometheus) GetNodeMemoryRequest

func (m *Prometheus) GetNodeMemoryRequest(ctx context.Context, projectID, clusterID, nodeName string, start,
	end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeMemoryRequest 节点Memory请求量

func (*Prometheus) GetNodeMemoryRequestUsage

func (m *Prometheus) GetNodeMemoryRequestUsage(ctx context.Context, projectID, clusterID, nodeName string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeMemoryRequestUsage 节点内存装箱率

func (*Prometheus) GetNodeMemoryTotal

func (m *Prometheus) GetNodeMemoryTotal(ctx context.Context, projectID, clusterID, nodeName string, start,
	end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeMemoryTotal 节点Memory总量

func (*Prometheus) GetNodeMemoryUsage

func (m *Prometheus) GetNodeMemoryUsage(ctx context.Context, projectID, clusterID, nodeName string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeMemoryUsage 节点内存使用率

func (*Prometheus) GetNodeMemoryUsed

func (m *Prometheus) GetNodeMemoryUsed(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeMemoryUsed 节点Memory使用量

func (*Prometheus) GetNodeNetworkReceive

func (m *Prometheus) GetNodeNetworkReceive(ctx context.Context, projectID, clusterID, nodeName string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeNetworkReceive 节点网络接收量

func (*Prometheus) GetNodeNetworkTransmit

func (m *Prometheus) GetNodeNetworkTransmit(ctx context.Context, projectID, clusterID, nodeName string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetNodeNetworkTransmit 网络发送量

func (*Prometheus) GetNodePodCount

func (m *Prometheus) GetNodePodCount(ctx context.Context, projectID, clusterID, nodeName string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodePodCount PodCount

func (*Prometheus) GetNodePodTotal

func (m *Prometheus) GetNodePodTotal(ctx context.Context, projectID, clusterID, node string, start, end time.Time,
	step time.Duration) ([]*prompb.TimeSeries, error)

GetNodePodTotal PodTotal

func (*Prometheus) GetPodCPULimitUsage

func (m *Prometheus) GetPodCPULimitUsage(
	ctx context.Context, projectID, clusterID, namespace string, podNameList []string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetPodCPULimitUsage POD CPU Limit 使用率

func (*Prometheus) GetPodCPURequestUsage

func (m *Prometheus) GetPodCPURequestUsage(
	ctx context.Context, projectID, clusterID, namespace string, podNameList []string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetPodCPURequestUsage POD CPU Request 使用率

func (*Prometheus) GetPodCPUUsage

func (m *Prometheus) GetPodCPUUsage(ctx context.Context, projectID, clusterID, namespace string, podNameList []string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetPodCPUUsage POD 使用率

func (*Prometheus) GetPodMemoryUsed

func (m *Prometheus) GetPodMemoryUsed(ctx context.Context, projectID, clusterID, namespace string, podNameList []string,
	start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetPodMemoryUsed 内存使用量

func (*Prometheus) GetPodNetworkReceive

func (m *Prometheus) GetPodNetworkReceive(ctx context.Context, projectID, clusterID, namespace string,
	podNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetPodNetworkReceive 网络接收

func (*Prometheus) GetPodNetworkTransmit

func (m *Prometheus) GetPodNetworkTransmit(ctx context.Context, projectID, clusterID, namespace string,
	podNameList []string, start, end time.Time, step time.Duration) ([]*prompb.TimeSeries, error)

GetPodNetworkTransmit 网络发送

Jump to

Keyboard shortcuts

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