common

package
v0.0.0-...-0f49ba3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_HOST = "127.0.0.1"
View Source
const ENV_K8S_NODE_IP = "K8S_NODE_IP_FOR_DEEPFLOW"
View Source
const QUEUE_SIZE = 1 << 16

Variables

This section is empty.

Functions

func ExportersEnabled

func ExportersEnabled(configPath string) bool

func GetMemInuse

func GetMemInuse() uint64

func GetNetIO

func GetNetIO() (uint64, uint64)

func NewDiskMonitor

func NewDiskMonitor(paths []string, hostIp string)

Types

type Config

type Config struct {
	Ingester IngesterConfig `yaml:"ingester"`
}

type ControllerIngesterShared

type ControllerIngesterShared struct {
	ResourceEventQueue *queue.OverwriteQueue
}

func NewControllerIngesterShared

func NewControllerIngesterShared() *ControllerIngesterShared

type Counter

type Counter struct {
	CpuPercent float64 `statsd:"cpu-percent"`
	MemRSS     uint64  `statsd:"mem-rss"`
	MemInuse   uint64  `statsd:"mem-inuse"`
	BytesSend  uint64  `statsd:"bytes-send"`
	BytesRecv  uint64  `statsd:"bytes-recv"`
	BytesRead  uint64  `statsd:"bytes-read"`
	BytesWrite uint64  `statsd:"bytes-write"`
	Load1      float64 `statsd:"load1"`
	CPUNum     uint64  `statsd:"cpu-num"`
}

type DiskCounter

type DiskCounter struct {
	Total       uint64  `statsd:"total"`
	Free        uint64  `statsd:"free"`
	Used        uint64  `statsd:"used"`
	UsedPercent float64 `statsd:"used-percent"`
}

type DiskMonitor

type DiskMonitor struct {
	utils.Closable
	// contains filtered or unexported fields
}

func (*DiskMonitor) GetCounter

func (m *DiskMonitor) GetCounter() interface{}

func (*DiskMonitor) Stop

func (m *DiskMonitor) Stop()

type ExportersConfig

type ExportersConfig struct {
	Enabled bool `yaml:"enabled"`
}

type IngesterConfig

type IngesterConfig struct {
	Exporters []ExportersConfig `yaml:"exporters"`
}

type Monitor

type Monitor struct {
	utils.Closable
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(paths []string) (*Monitor, error)

func (*Monitor) GetCounter

func (m *Monitor) GetCounter() interface{}

func (*Monitor) GetCpuNum

func (m *Monitor) GetCpuNum() uint64

func (*Monitor) GetCpuPercent

func (m *Monitor) GetCpuPercent() float64

func (*Monitor) GetDiskIO

func (m *Monitor) GetDiskIO() (uint64, uint64)

func (*Monitor) GetLoad1

func (m *Monitor) GetLoad1() float64

func (*Monitor) GetMemRSS

func (m *Monitor) GetMemRSS() uint64

func (*Monitor) Stop

func (m *Monitor) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL