Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CpuMetrics = []*Metric{ { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.CPU == nil { return value{} } return value{ V: float64(stats.CPU.Usage.Total), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.CPU == nil { return value{} } return value{ V: float64(stats.CPU.Usage.Kernel), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.CPU == nil { return value{} } return value{ V: float64(stats.CPU.Usage.User), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.CPU == nil { return value{} } return value{ V: float64(stats.CPU.Throttling.Periods), } }, // contains filtered or unexported fields }, { Vt: prometheus.CounterValue, GetValues: func(stats *v1.Metrics) value { if stats.CPU == nil { return value{} } return value{ V: float64(stats.CPU.Throttling.ThrottledPeriods), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.CPU == nil { return value{} } return value{ V: float64(stats.CPU.Throttling.ThrottledTime), } }, // contains filtered or unexported fields }, }
View Source
var MemoryMetrics = []*Metric{ { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.Cache), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.RSS), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.RSSHuge), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.MappedFile), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.PgMajFault), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.InactiveAnon), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.ActiveAnon), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.InactiveFile), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.ActiveFile), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.TotalCache), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.TotalRSS), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.TotalMappedFile), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.Usage.Failcnt), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.Usage.Limit), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.Usage.Max), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.Usage.Usage), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.Kernel.Failcnt), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.Kernel.Limit), } }, // contains filtered or unexported fields }, { Vt: prometheus.GaugeValue, GetValues: func(stats *v1.Metrics) value { if stats.Memory == nil { return value{} } return value{ V: float64(stats.Memory.Kernel.Usage), } }, // contains filtered or unexported fields }, }
Functions ¶
func GetContainerStats ¶
func NewContainerdClient ¶
func NewContainerdClient(address, namespace string) (*containerd.Client, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.