node

package
v0.0.0-...-2db6d58 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 9 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

View Source
var ClusterNodeRoles = make(map[string]map[model.LabelValue]bool)
View Source
var GpuPercentQuerySuffix = common.DcgmPercentQuerySuffix("kube_node_status_allocatable", common.Node)

Functions

func DetermineExporters

func DetermineExporters(range5Min *v1.Range)

func DetermineGpuExporter

func DetermineGpuExporter(range5Min *v1.Range) (s string)

func GetGpuExporterType

func GetGpuExporterType(range5Min *v1.Range, cluster string) (s string)

func GetGpuExporters

func GetGpuExporters(range5Min *v1.Range) map[string][]string

func GetMemActualQuery

func GetMemActualQuery() string

func GetNodeGpuSharingStrategy

func GetNodeGpuSharingStrategy(cluster, nodeName string) (gss string)

func GetOSInstanceType

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

GetOSInstanceType is exported for usage in nodegroup package as well

func HasBeylaExporter

func HasBeylaExporter(range5Min *v1.Range) bool

HasBeylaExporter returns true if Beyla exporter metrics are present for any cluster

func HasDcgmExporter

func HasDcgmExporter(range5Min *v1.Range) bool

HasDcgmExporter returns true if DCGM exporter metrics are present for any cluster

func HasEphemeralStorageExporter

func HasEphemeralStorageExporter(range5Min *v1.Range) bool

HasEphemeralStorageExporter returns true if ephemeral storage exporter metrics are present for any cluster

func HasKubexGpuExporter

func HasKubexGpuExporter(range5Min *v1.Range) bool

HasKubexGpuExporter returns true if Kubex GPU exporter metrics are present for any cluster

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

func OverrideNodeNames

func OverrideNodeNames(cluster string, nodes string, sep string) string

func SumToAverage

func SumToAverage(query string) string

Types

type QueryWrapper

type QueryWrapper struct {
	Query, SumQuery, CountQuery, AvgQuery *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