containerCPUUsagePercentage

package
v4.2.294+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetricName Metric name to query from prometheus
	MetricName = "namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate"
	// NamespaceLabel Namespace label name in the metric
	NamespaceLabel = "namespace"
	// PodLabelName pod label name in the metric
	PodLabelName = "pod_name"
	// ContainerLabel container label name in the metric
	ContainerLabel = "container_name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	PrometheusEntity InternalPromth.Entity

	Namespace     string
	PodName       string
	ContainerName string
	Samples       []metric.Sample
}

Entity Container cpu usage percentage entity

func NewEntityFromPrometheusEntity

func NewEntityFromPrometheusEntity(e InternalPromth.Entity) Entity

NewEntityFromPrometheusEntity New entity with field value assigned from prometheus entity

func (*Entity) ContainerMetric

func (e *Entity) ContainerMetric() DaoMetric.ContainerMetric

ContainerMetric Build ContainerMetric base on entity properties

Jump to

Keyboard shortcuts

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