node

package
v0.0.0-...-7d8f466 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HasNodeLabel          = "node_label_node_name"     // "node" label is present and has the node name
	HasInstanceLabelPodIp = "instance_label_pod_ip"    // "node" label is absent, "instance" label has a format of IP address:port
	HasInstanceLabelOther = "instance_label_node_name" // "node" label is absent, "instance" label has a different format and assumed to be node name
)
View Source
const (
	ByPodIpSuffix = `, "pod_ip", "$1", "instance", "(.*):.*")) by (pod_ip) * on (pod_ip) group_right kube_pod_info{pod=~".*node-exporter.*"}`
)

Variables

This section is empty.

Functions

func DetermineNodeExporter

func DetermineNodeExporter(range5Min v1.Range)

func GetOSInstanceType

func GetOSInstanceType(labelMap map[string]string) (string, string)

GetOSInstanceType is exported for usage in nodegroup package as well

func HasNodeExporter

func HasNodeExporter(range5Min v1.Range) bool

HasNodeExporter returns true if node exporter metrics are present for any cluster

func Metrics

func Metrics()

Metrics a global func for collecting node level metrics in prometheus

Types

type QueryWrapper

type QueryWrapper struct {
	Query, SumQuery *common.WorkloadQueryWrapper
	MetricField     []model.LabelName
}

func GetQueryWrappers

func GetQueryWrappers(qws *[]*QueryWrapper, qwm map[string]*QueryWrapper) []*QueryWrapper

GetQueryWrappers returns the query wrappers that are relevant for the current environment

Jump to

Keyboard shortcuts

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