Documentation
¶
Index ¶
- Constants
- Variables
- func DetermineExporters(range5Min *v1.Range)
- func DetermineGpuExporter(range5Min *v1.Range) (s string)
- func GetGpuExporterType(range5Min *v1.Range, cluster string) (s string)
- func GetGpuExporters(range5Min *v1.Range) map[string][]string
- func GetMemActualQuery() string
- func GetNodeGpuSharingStrategy(cluster, nodeName string) (gss string)
- func GetOSInstanceType(labelMap map[string]string) (string, string)
- func HasBeylaExporter(range5Min *v1.Range) bool
- func HasDcgmExporter(range5Min *v1.Range) bool
- func HasEphemeralStorageExporter(range5Min *v1.Range) bool
- func HasKubexGpuExporter(range5Min *v1.Range) bool
- func HasNodeExporter(range5Min *v1.Range) bool
- func Metrics()
- func OverrideNodeNames(cluster string, nodes string, sep string) string
- func SumToAverage(query string) string
- type QueryWrapper
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 DetermineGpuExporter ¶
func GetMemActualQuery ¶
func GetMemActualQuery() string
func GetOSInstanceType ¶
GetOSInstanceType is exported for usage in nodegroup package as well
func HasBeylaExporter ¶
HasBeylaExporter returns true if Beyla exporter metrics are present for any cluster
func HasDcgmExporter ¶
HasDcgmExporter returns true if DCGM exporter metrics are present for any cluster
func HasEphemeralStorageExporter ¶
HasEphemeralStorageExporter returns true if ephemeral storage exporter metrics are present for any cluster
func HasKubexGpuExporter ¶
HasKubexGpuExporter returns true if Kubex GPU exporter metrics are present for any cluster
func HasNodeExporter ¶
HasNodeExporter returns true if node exporter metrics are present for any cluster
func SumToAverage ¶
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
Click to show internal directories.
Click to hide internal directories.