Beispiel #1
0
func (c *lxcMemCollector) Init() error {
	kernelVersion, err := kernel.GetMajorVersion()
	if err != nil {
		return err
	}

	c.lxcStat, err = lxc.New(kernelVersion)
	return err
}
Beispiel #2
0
func (c *lxcCPUCollector) Init() error {
	kernelVersion, err := kernel.GetMajorVersion()
	if err != nil {
		return err
	}

	c.lxcStat, err = lxc.New(kernelVersion)
	physicalStat, _ = cpu.GetProcStat()
	c.scrapMetrics()
	return err
}