metrics

package
v4.2.521+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Metric name to query from prometheus
	NodeMemoryBytesTotalMetricName = "node:node_memory_bytes_total:sum"
	// Label name in prometheus metric
	NodeMemoryBytesTotalLabelNode = "node"

	// Metric name to query from prometheus
	NodeMemoryBytesAvailableMetricName = "node:node_memory_bytes_available:sum"
	// Label name in prometheus metric
	NodeMemoryBytesAvailableLabelNode = "node"

	// Metric name to query from prometheus
	NodeMemoryUtilizationMetricName = "node:node_memory_utilisation_2:"
	// Label name in prometheus metric
	NodeMemoryUtilizationLabelNode = "node"

	// Label name in prometheus metric
	NodeMemoryBytesUsageLabelNode = "node"

	// Metric name to query from prometheus
	NodeCpuUsagePercentageMetricNameSum = "node:node_num_cpu:sum"
	NodeCpuUsagePercentageMetricNameAvg = "node:node_cpu_utilisation:avg1m"
	// Label name in prometheus metric
	NodeCpuUsagePercentageLabelNode = "node"

	// Metric name to query from prometheus
	ContainerCpuUsagePercentageMetricName = "namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate"
	// Label name in prometheus metric
	ContainerCpuUsagePercentageLabelNamespace     = "namespace"
	ContainerCpuUsagePercentageLabelPodName       = "pod_name"
	ContainerCpuUsagePercentageLabelContainerName = "container_name"

	// Metric name to query from prometheus
	ContainerMemoryUsageBytesMetricName = "container_memory_usage_bytes"
	// Label name in prometheus metric
	ContainerMemoryUsageBytesLabelNamespace     = "namespace"
	ContainerMemoryUsageBytesLabelPodName       = "pod_name"
	ContainerMemoryUsageBytesLabelContainerName = "container_name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerCpuUsageRepository

type ContainerCpuUsageRepository struct {
	PrometheusConfig InternalPromth.Config
}

func NewContainerCpuUsageRepositoryWithConfig

func NewContainerCpuUsageRepositoryWithConfig(cfg InternalPromth.Config) ContainerCpuUsageRepository

func (ContainerCpuUsageRepository) ListContainerCPUUsageMillicoresEntitiesByNamespaceAndPodNames

func (c ContainerCpuUsageRepository) ListContainerCPUUsageMillicoresEntitiesByNamespaceAndPodNames(ctx context.Context, namespace string, podNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.ContainerCPUUsageMillicoresEntity, error)

type ContainerMemoryUsageRepository

type ContainerMemoryUsageRepository struct {
	PrometheusConfig InternalPromth.Config
}

ContainerMemoryUsageRepository Repository to access metric container_memory_usage_bytes from prometheus

func NewContainerMemoryUsageRepositoryWithConfig

func NewContainerMemoryUsageRepositoryWithConfig(cfg InternalPromth.Config) ContainerMemoryUsageRepository

NewContainerMemoryUsageRepositoryWithConfig New pod container memory usage bytes repository with prometheus configuration

func (ContainerMemoryUsageRepository) ListContainerMemoryUsageBytesEntitiesByNamespaceAndPodNames

func (c ContainerMemoryUsageRepository) ListContainerMemoryUsageBytesEntitiesByNamespaceAndPodNames(ctx context.Context, namespace string, podNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.ContainerMemoryUsageBytesEntity, error)

type NamespaceCPUUsageRepository

type NamespaceCPUUsageRepository struct {
	PrometheusConfig InternalPromth.Config
}

NamespaceCPUUsageRepository Repository to access metric namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate from prometheus

func NewNamespaceCPUUsageRepositoryWithConfig

func NewNamespaceCPUUsageRepositoryWithConfig(cfg InternalPromth.Config) NamespaceCPUUsageRepository

NewNamespaceCPUUsageRepositoryWithConfig New namespace cpu usage millicores repository with prometheus configuration

func (NamespaceCPUUsageRepository) ListNamespaceCPUUsageMillicoresEntitiesByNamespaceNames

func (c NamespaceCPUUsageRepository) ListNamespaceCPUUsageMillicoresEntitiesByNamespaceNames(ctx context.Context, namespaceNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.NamespaceCPUUsageMillicoresEntity, error)

type NamespaceMemoryUsageRepository

type NamespaceMemoryUsageRepository struct {
	PrometheusConfig InternalPromth.Config
}

NamespaceMemoryUsageRepository Repository to access metric from prometheus

func NewNamespaceMemoryUsageRepositoryWithConfig

func NewNamespaceMemoryUsageRepositoryWithConfig(cfg InternalPromth.Config) NamespaceMemoryUsageRepository

NewNamespaceMemoryUsageRepositoryWithConfig New namespace memory usage bytes repository with prometheus configuration

func (NamespaceMemoryUsageRepository) ListNamespaceMemoryUsageBytesEntitiesByNamespaceNames

func (n NamespaceMemoryUsageRepository) ListNamespaceMemoryUsageBytesEntitiesByNamespaceNames(ctx context.Context, namespaceNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.NamespaceMemoryUsageBytesEntity, error)

type NodeCPUUsageRepository

type NodeCPUUsageRepository struct {
	PrometheusConfig InternalPromth.Config
}

NodeCPUUsageRepository Repository to access metric node:node_cpu_utilisation:avg1m from prometheus

func NewNodeCPUUsageRepositoryWithConfig

func NewNodeCPUUsageRepositoryWithConfig(cfg InternalPromth.Config) NodeCPUUsageRepository

NewNodeCPUUsageRepositoryWithConfig New node cpu usage repository with prometheus configuration

func (NodeCPUUsageRepository) ListNodeCPUUsageMillicoresEntitiesByNodeNames

func (n NodeCPUUsageRepository) ListNodeCPUUsageMillicoresEntitiesByNodeNames(ctx context.Context, nodeNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.NodeCPUUsageMillicoresEntity, error)

func (NodeCPUUsageRepository) ListSumOfNodeCPUUsageMillicoresByNodeNames

func (n NodeCPUUsageRepository) ListSumOfNodeCPUUsageMillicoresByNodeNames(ctx context.Context, nodeNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.NodeCPUUsageMillicoresEntity, error)

type NodeMemoryUsageRepository

type NodeMemoryUsageRepository struct {
	PrometheusConfig InternalPromth.Config
}

func NewNodeMemoryUsageRepositoryWithConfig

func NewNodeMemoryUsageRepositoryWithConfig(cfg InternalPromth.Config) NodeMemoryUsageRepository

func (NodeMemoryUsageRepository) ListNodeMemoryBytesUsageEntitiesByNodeNames

func (n NodeMemoryUsageRepository) ListNodeMemoryBytesUsageEntitiesByNodeNames(ctx context.Context, nodeNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.NodeMemoryBytesUsageEntity, error)

func (NodeMemoryUsageRepository) ListSumOfNodeMetricsByNodeNames

func (n NodeMemoryUsageRepository) ListSumOfNodeMetricsByNodeNames(ctx context.Context, nodeNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.NodeMemoryBytesUsageEntity, error)

type PodCPUUsageRepository

type PodCPUUsageRepository struct {
	PrometheusConfig InternalPromth.Config
}

PodCPUUsageRepository Repository to access metric namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate from prometheus

func NewPodCPUUsageRepositoryWithConfig

func NewPodCPUUsageRepositoryWithConfig(cfg InternalPromth.Config) PodCPUUsageRepository

NewPodCPUUsageRepositoryWithConfig New pod cpu usage millicores repository with prometheus configuration

func (PodCPUUsageRepository) ListPodCPUUsageMillicoresEntitiesBySummingPodMetrics

func (c PodCPUUsageRepository) ListPodCPUUsageMillicoresEntitiesBySummingPodMetrics(ctx context.Context, namespace string, podNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.PodCPUUsageMillicoresEntity, error)

type PodMemoryUsageRepository

type PodMemoryUsageRepository struct {
	PrometheusConfig InternalPromth.Config
}

PodMemoryUsageRepository Repository to access metric container_memory_usage_bytes from prometheus

func NewPodMemoryUsageRepositoryWithConfig

func NewPodMemoryUsageRepositoryWithConfig(cfg InternalPromth.Config) PodMemoryUsageRepository

NewPodMemoryUsageRepositoryWithConfig New pod memory usage bytes repository with prometheus configuration

func (PodMemoryUsageRepository) ListPodMemoryUsageBytesEntityBySummingPodMetrics

func (c PodMemoryUsageRepository) ListPodMemoryUsageBytesEntityBySummingPodMetrics(ctx context.Context, namespace string, podNames []string, options ...DBCommon.Option) ([]EntityPromthMetric.PodMemoryUsageBytesEntity, error)

Jump to

Keyboard shortcuts

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