Documentation ¶
Index ¶
- Variables
- func New(ic *plugin.InitContext) (interface{}, error)
- type Collector
- func (c *Collector) Add(id, namespace string, cg cgroups.Cgroup) error
- func (c *Collector) Collect(ch chan<- prometheus.Metric)
- func (c *Collector) Describe(ch chan<- *prometheus.Desc)
- func (c *Collector) Get(id, namespace string) (cgroups.Cgroup, error)
- func (c *Collector) Remove(id, namespace string)
- type OOMCollector
- type Trigger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyCollected = errors.New("cgroup is already being collected") ErrCgroupNotExists = errors.New("cgroup does not exist in the collector") )
Functions ¶
func New ¶
func New(ic *plugin.InitContext) (interface{}, error)
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector provides the ability to collect container stats and export them in the prometheus format
func NewCollector ¶
New registers the Collector with the provided namespace and returns it so that cgroups can be added for collection
func (*Collector) Add ¶
Add adds the provided cgroup and id so that metrics are collected and exported
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric)
func (*Collector) Describe ¶
func (c *Collector) Describe(ch chan<- *prometheus.Desc)
type OOMCollector ¶
type OOMCollector struct {
// contains filtered or unexported fields
}
func NewOOMCollector ¶
func NewOOMCollector(ns *metrics.Namespace) (*OOMCollector, error)
func (*OOMCollector) Collect ¶
func (o *OOMCollector) Collect(ch chan<- prometheus.Metric)
func (*OOMCollector) Describe ¶
func (o *OOMCollector) Describe(ch chan<- *prometheus.Desc)
Click to show internal directories.
Click to hide internal directories.