metrics

package
v4.3.1008+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerCpu      influxdb.Measurement = "container_cpu"
	ContainerMemory   influxdb.Measurement = "container_memory"
	NodeCpu           influxdb.Measurement = "node_cpu"
	NodeMemory        influxdb.Measurement = "node_memory"
	ApplicationCpu    influxdb.Measurement = "application_cpu"
	ApplicationMemory influxdb.Measurement = "application_memory"
	ClusterCpu        influxdb.Measurement = "cluster_cpu"
	ClusterMemory     influxdb.Measurement = "cluster_memory"
	NamespaceCpu      influxdb.Measurement = "namespace_cpu"
	NamespaceMemory   influxdb.Measurement = "namespace_memory"
	ControllerCpu     influxdb.Measurement = "controller_cpu"
	ControllerMemory  influxdb.Measurement = "controller_memory"
)

Variables

View Source
var PodNameRegularExpression = map[string]string{
	"DEPLOYMENT":       consts.DeploymentPodFormat,
	"STATEFULSET":      consts.StatefulSetPodFormat,
	"DEPLOYMENTCONFIG": consts.DeploymentConfigPodFormat,
}

Functions

func ListNodesByCluster

func ListNodesByCluster(config influxdb.Config, cluster *types.Cluster) ([]*types.Node, error)

func ListPodsByApplication

func ListPodsByApplication(config influxdb.Config, application *types.Application) ([]*types.Pod, error)

func ListPodsByController

func ListPodsByController(config influxdb.Config, controller *types.Controller) ([]*types.Pod, error)

Types

type Application

type Application struct {
	InfluxDBConfig InfluxDB.Config
}

func NewApplicationWithConfig

func NewApplicationWithConfig(config InfluxDB.Config) *Application

func (*Application) GetMetricMap

type ApplicationCPURepository

type ApplicationCPURepository struct {
	// contains filtered or unexported fields
}

func NewApplicationCPURepositoryWithConfig

func NewApplicationCPURepositoryWithConfig(influxDBCfg InfluxDB.Config) *ApplicationCPURepository

func (*ApplicationCPURepository) CreateMetrics

func (*ApplicationCPURepository) GetApplicationMetricMap

type ApplicationMemoryRepository

type ApplicationMemoryRepository struct {
	// contains filtered or unexported fields
}

func NewApplicationMemoryRepositoryWithConfig

func NewApplicationMemoryRepositoryWithConfig(influxDBCfg InfluxDB.Config) *ApplicationMemoryRepository

func (*ApplicationMemoryRepository) CreateMetrics

func (*ApplicationMemoryRepository) GetApplicationMetricMap

type Cluster

type Cluster struct {
	InfluxDBConfig InfluxDB.Config
}

func NewClusterWithConfig

func NewClusterWithConfig(config InfluxDB.Config) *Cluster

type ClusterCPURepository

type ClusterCPURepository struct {
	// contains filtered or unexported fields
}

func NewClusterCPURepositoryWithConfig

func NewClusterCPURepositoryWithConfig(influxDBCfg InfluxDB.Config) *ClusterCPURepository

func (*ClusterCPURepository) CreateMetrics

func (*ClusterCPURepository) GetClusterMetricMap

type ClusterMemoryRepository

type ClusterMemoryRepository struct {
	// contains filtered or unexported fields
}

func NewClusterMemoryRepositoryWithConfig

func NewClusterMemoryRepositoryWithConfig(influxDBCfg InfluxDB.Config) *ClusterMemoryRepository

func (*ClusterMemoryRepository) CreateMetrics

func (*ClusterMemoryRepository) GetClusterMetricMap

type ContainerCpuRepository

type ContainerCpuRepository struct {
	// contains filtered or unexported fields
}

func NewContainerCpuRepositoryWithConfig

func NewContainerCpuRepositoryWithConfig(influxDBCfg InfluxDB.Config) *ContainerCpuRepository

func (*ContainerCpuRepository) CreateMetrics

func (*ContainerCpuRepository) ListMetrics

type ContainerMemoryRepository

type ContainerMemoryRepository struct {
	// contains filtered or unexported fields
}

func NewContainerMemoryRepositoryWithConfig

func NewContainerMemoryRepositoryWithConfig(influxDBCfg InfluxDB.Config) *ContainerMemoryRepository

func (*ContainerMemoryRepository) CreateMetrics

func (*ContainerMemoryRepository) ListMetrics

type Controller

type Controller struct {
	InfluxDBConfig InfluxDB.Config
}

func NewControllerWithConfig

func NewControllerWithConfig(config InfluxDB.Config) *Controller

type ControllerCPURepository

type ControllerCPURepository struct {
	// contains filtered or unexported fields
}

func NewControllerCPURepositoryWithConfig

func NewControllerCPURepositoryWithConfig(influxDBCfg InfluxDB.Config) *ControllerCPURepository

func (*ControllerCPURepository) CreateMetrics

type ControllerMemoryRepository

type ControllerMemoryRepository struct {
	// contains filtered or unexported fields
}

func NewControllerMemoryRepositoryWithConfig

func NewControllerMemoryRepositoryWithConfig(influxDBCfg InfluxDB.Config) *ControllerMemoryRepository

func (*ControllerMemoryRepository) CreateMetrics

func (*ControllerMemoryRepository) GetControllerMetricMap

type NamespaceCPURepository

type NamespaceCPURepository struct {
	// contains filtered or unexported fields
}

func NewNamespaceCPURepositoryWithConfig

func NewNamespaceCPURepositoryWithConfig(influxDBCfg InfluxDB.Config) *NamespaceCPURepository

func (*NamespaceCPURepository) CreateMetrics

type NamespaceMemoryRepository

type NamespaceMemoryRepository struct {
	// contains filtered or unexported fields
}

func NewNamespaceMemoryRepositoryWithConfig

func NewNamespaceMemoryRepositoryWithConfig(influxDBCfg InfluxDB.Config) *NamespaceMemoryRepository

func (*NamespaceMemoryRepository) CreateMetrics

func (*NamespaceMemoryRepository) GetNamespaceMetricMap

type NodeCpuRepository

type NodeCpuRepository struct {
	// contains filtered or unexported fields
}

func NewNodeCpuRepositoryWithConfig

func NewNodeCpuRepositoryWithConfig(influxDBCfg InfluxDB.Config) *NodeCpuRepository

func (*NodeCpuRepository) CreateMetrics

func (r *NodeCpuRepository) CreateMetrics(metrics []*DaoMetricTypes.NodeMetricSample) error

func (*NodeCpuRepository) ListMetrics

type NodeMemoryRepository

type NodeMemoryRepository struct {
	// contains filtered or unexported fields
}

func NewNodeMemoryRepositoryWithConfig

func NewNodeMemoryRepositoryWithConfig(influxDBCfg InfluxDB.Config) *NodeMemoryRepository

func (*NodeMemoryRepository) CreateMetrics

func (r *NodeMemoryRepository) CreateMetrics(metrics []*DaoMetricTypes.NodeMetricSample) error

func (*NodeMemoryRepository) ListMetrics

Jump to

Keyboard shortcuts

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