Documentation ¶
Index ¶
- Variables
- func InterferenceCounterInc(metricsKind string)
- func KillCounterInc(offlineType string)
- func NewPrometheusCollector(nodeName string, statsMetric map[StatsMetric]interface{}, ...) prometheus.Collector
- func NodeResourceMetricsReset(res v1.ResourceList, resType string)
- func NodeScheduleDisabled(disabled float64)
- func OnlineJobsMetrics(jobName string, metrics map[string]float64)
- func RegisterTotalMetrics(reg *prometheus.Registry)
- func SLONotMetCounterInc(appName string)
- type ContainerResourceMetric
- type DiskQuotaMetric
- type NodeResourceMetric
- type PerfResourceMetric
- type RdtResourceMetric
- type ResourceMetrics
- type StatsMetric
Constants ¶
This section is empty.
Variables ¶
var ( // NodeResourceTypePredict shows total resource of the node NodeResourceTypeTotal = "total" // NodeResourceTypeBuffer shows buffer resource between online and offline NodeResourceTypeBuffer = "buffer" // NodeResourceTypeOnlinePredict shows predicted total online resources NodeResourceTypeOnlinePredict = types.NodeResourceTypeOnlinePredict // NodeResourceTypeOfflinePredict shows: total - buffer - predicted_online NodeResourceTypeOfflinePredict = "offline_predict" // NodeResourceTypeOfflineConflict shows: total - buffer - predicted_online - conflicted NodeResourceTypeOfflineConflict = "offline_conflict" // NodeResourceTypeOfflineFormat shows: total - buffer - predicted_online - conflicted - formated(based on disks) NodeResourceTypeOfflineFormat = "offline_format" // NodeResourceTypeOfflineCapacity shows capacity resource for offline slave node NodeResourceTypeOfflineCapacity = "offline_capacity" // NodeResourceTypeOfflineAllocated shows total resource for allocated offline jobs NodeResourceTypeOfflineAllocated = "offline_allocated" // NodeResourceTypeOfflineDisks shows cpu resource decrease because of disk limit NodeResourceTypeOfflineDisks = "offline_disks" )
Functions ¶
func InterferenceCounterInc ¶
func InterferenceCounterInc(metricsKind string)
InterferenceCounterInc increases interference count number
func KillCounterInc ¶
func KillCounterInc(offlineType string)
KillCounterInc increases kill count number
func NewPrometheusCollector ¶
func NewPrometheusCollector(nodeName string, statsMetric map[StatsMetric]interface{}, metrics ResourceMetrics) prometheus.Collector
NewPrometheusCollector new prometheus collector
func NodeResourceMetricsReset ¶
func NodeResourceMetricsReset(res v1.ResourceList, resType string)
NodeResourceMetricsReset resets node offline resource quantity, the resType should be predict or capacity
func NodeScheduleDisabled ¶
func NodeScheduleDisabled(disabled float64)
NodeScheduleDisabled records nodes number in schedule disabled state
func OnlineJobsMetrics ¶
OnlineJobsMetrics records online job metric data
func RegisterTotalMetrics ¶
func RegisterTotalMetrics(reg *prometheus.Registry)
RegisterTotalMetrics registers total metrics
func SLONotMetCounterInc ¶
func SLONotMetCounterInc(appName string)
SLONotMetCounterInc increases sloNotMetCounter number
Types ¶
type ContainerResourceMetric ¶
type ContainerResourceMetric struct { Name string Description string ValueFn func(cgroupStats *cgroupstore.CgroupStats) metricValues // contains filtered or unexported fields }
ContainerResourceMetric show metrics for container
type DiskQuotaMetric ¶
type DiskQuotaMetric struct { Name string Description string ValueFn func(volumes *diskquota.PodVolumes) metricValues // contains filtered or unexported fields }
DiskQuotaMetric show disk quota metrics for pod
type NodeResourceMetric ¶
type NodeResourceMetric struct { Name string Description string ValueFn func(nodeSt *nodestore.NodeResourceState) metricValues ValueFn2 func(stStore statestore.StateStore) metricValues // contains filtered or unexported fields }
NodeResourceMetric describe the node metric options
type PerfResourceMetric ¶
type PerfResourceMetric struct { Name string Description string ValueFn func(perfMetrics *perfstore.PerfMetrics) metricValues // contains filtered or unexported fields }
PerfResourceMetric show metrics for perf
type RdtResourceMetric ¶
type RdtResourceMetric struct { Name string Description string ValueFn func(rdtMetrics *rdtstore.RdtMetrics) metricValues // contains filtered or unexported fields }
RdtResourceMetric show metrics for RDT
type ResourceMetrics ¶
type ResourceMetrics struct { NodeMetrics []NodeResourceMetric ContainerMetrics []ContainerResourceMetric PerfMetrics []PerfResourceMetric RdtMetrics []RdtResourceMetric DiskQuotaMetrics []DiskQuotaMetric }
ResourceMetrics group all metrics
func ResourceMetricsConfig ¶
func ResourceMetricsConfig() ResourceMetrics
ResourceMetricsConfig return all metrics
type StatsMetric ¶
type StatsMetric string
var ( StatsMetricStore StatsMetric = "store" StatsMetricDiskQuota StatsMetric = "diskquota" )