Documentation ¶
Index ¶
- Constants
- func GetDiskDevices() ([]string, error)
- func GetNetworkInterfacesInfo() ([]map[string]string, error)
- func GetPartitions() ([]disk.PartitionStat, error)
- func GetProcessesData() ([]agentintegration.ProcessData, error)
- type CoreCPUStatPrivider
- type DiskIOStatProvider
- type DiskUsageStatProvider
- type IOMeasure
- type OverallCPUStatPrivider
- type OverallNetworkStatProvider
- type Service
- type StatCollector
- func GetCoreCpuStatCollectors() ([]*StatCollector, error)
- func GetDiskIOStatCollectors() ([]*StatCollector, error)
- func GetDiskUsageStatCollector() (*StatCollector, error)
- func GetStatCollector(provider StatProvider) (*StatCollector, error)
- func GetStatCollectors(providers []StatProvider) ([]*StatCollector, error)
- type StatProvider
- type StatProviderFilter
- type StatProviderTimeFilter
- type SwapMemoryStatPrivider
- type VirtualMemoryStatPrivider
Constants ¶
View Source
const ( OVERALL_CPU_PROVIDER_CODE = "cpuoverall" CORE_CPU_PROVIDER_CODE = "cpucore" VIRTUAL_MEMORY_PROVIDER_CODE = "memoryvirtual" SWAP_MEMORY_PROVIDER_CODE = "memoryswap" DISK_USAGE_PROVIDER_CODE = "diskusage" DISK_IO_PROVIDER_CODE = "diskio" OVERALL_NETWORK_PROVIDER_CODE = "networkoverall" )
Variables ¶
This section is empty.
Functions ¶
func GetDiskDevices ¶
func GetPartitions ¶
func GetPartitions() ([]disk.PartitionStat, error)
func GetProcessesData ¶
func GetProcessesData() ([]agentintegration.ProcessData, error)
Types ¶
type CoreCPUStatPrivider ¶
type CoreCPUStatPrivider struct {
CoreNum int
}
CoreCPUStatPrivider retrieves statistics data for cpu per core
func (*CoreCPUStatPrivider) CheckData ¶
func (sc *CoreCPUStatPrivider) CheckData(data []string, filter StatProviderFilter) bool
func (*CoreCPUStatPrivider) GetCode ¶
func (sc *CoreCPUStatPrivider) GetCode() string
func (*CoreCPUStatPrivider) GetData ¶
func (sc *CoreCPUStatPrivider) GetData() ([]string, error)
type DiskIOStatProvider ¶
type DiskIOStatProvider struct {
Device string
}
DiskIOStatProvider retrieves statistics data for the disk IO
func (*DiskIOStatProvider) CheckData ¶
func (m *DiskIOStatProvider) CheckData(data []string, filter StatProviderFilter) bool
func (*DiskIOStatProvider) GetCode ¶
func (m *DiskIOStatProvider) GetCode() string
func (*DiskIOStatProvider) GetData ¶
func (m *DiskIOStatProvider) GetData() ([]string, error)
type DiskUsageStatProvider ¶
type DiskUsageStatProvider struct {
Mapper *diskService.MountpointIDMapper
}
DiskUsageStatProvider retrieves statistics data for the disk usage
func (*DiskUsageStatProvider) CheckData ¶
func (m *DiskUsageStatProvider) CheckData(data []string, filter StatProviderFilter) bool
func (*DiskUsageStatProvider) GetCode ¶
func (m *DiskUsageStatProvider) GetCode() string
func (*DiskUsageStatProvider) GetData ¶
func (m *DiskUsageStatProvider) GetData() ([]string, error)
func (*DiskUsageStatProvider) GetDiskInfo ¶
func (m *DiskUsageStatProvider) GetDiskInfo() (map[string]map[string]string, error)
type IOMeasure ¶
type IOMeasure struct { ReadCount, WriteCount, MergedReadCount, MergedWriteCount, ReadTime, WriteTime, IoTime, ReadBytes, WriteBytes uint64 }
type OverallCPUStatPrivider ¶
type OverallCPUStatPrivider struct{}
OverallCPUStatPrivider retrieves overall statistics data for cpu
func (*OverallCPUStatPrivider) CheckData ¶
func (sc *OverallCPUStatPrivider) CheckData(data []string, filter StatProviderFilter) bool
func (*OverallCPUStatPrivider) GetCode ¶
func (sc *OverallCPUStatPrivider) GetCode() string
func (*OverallCPUStatPrivider) GetData ¶
func (sc *OverallCPUStatPrivider) GetData() ([]string, error)
type OverallNetworkStatProvider ¶
type OverallNetworkStatProvider struct{}
OverallNetworkStatProvider retrieves statistics data for the network usage
func (*OverallNetworkStatProvider) CheckData ¶
func (n *OverallNetworkStatProvider) CheckData(data []string, filter StatProviderFilter) bool
func (*OverallNetworkStatProvider) GetCode ¶
func (n *OverallNetworkStatProvider) GetCode() string
func (*OverallNetworkStatProvider) GetData ¶
func (n *OverallNetworkStatProvider) GetData() ([]string, error)
type StatCollector ¶
type StatCollector struct { Provider StatProvider FilePath string // contains filtered or unexported fields }
func GetCoreCpuStatCollectors ¶
func GetCoreCpuStatCollectors() ([]*StatCollector, error)
func GetDiskIOStatCollectors ¶
func GetDiskIOStatCollectors() ([]*StatCollector, error)
func GetDiskUsageStatCollector ¶
func GetDiskUsageStatCollector() (*StatCollector, error)
func GetStatCollector ¶
func GetStatCollector(provider StatProvider) (*StatCollector, error)
func GetStatCollectors ¶
func GetStatCollectors(providers []StatProvider) ([]*StatCollector, error)
func (*StatCollector) Collect ¶
func (sc *StatCollector) Collect() error
func (*StatCollector) Load ¶
func (sc *StatCollector) Load(filter StatProviderFilter) ([][]string, error)
type StatProvider ¶
type StatProvider interface { GetData() ([]string, error) GetCode() string CheckData([]string, StatProviderFilter) bool }
func GetCoreCpuStatProviders ¶
func GetCoreCpuStatProviders() ([]StatProvider, error)
GetCoreCpuStatProviders creates statistics providers for cpu cores
func GetDiskUsageStatProvider ¶
func GetDiskUsageStatProvider() (StatProvider, error)
type StatProviderFilter ¶
type StatProviderTimeFilter ¶
type StatProviderTimeFilter struct {
FromTime, ToTime int
}
func (*StatProviderTimeFilter) Check ¶
func (f *StatProviderTimeFilter) Check(row []string) bool
type SwapMemoryStatPrivider ¶
type SwapMemoryStatPrivider struct{}
SwapMemoryStatPrivider retrieves statistics data for memory
func (*SwapMemoryStatPrivider) CheckData ¶
func (m *SwapMemoryStatPrivider) CheckData(data []string, filter StatProviderFilter) bool
func (*SwapMemoryStatPrivider) GetCode ¶
func (m *SwapMemoryStatPrivider) GetCode() string
func (*SwapMemoryStatPrivider) GetData ¶
func (m *SwapMemoryStatPrivider) GetData() ([]string, error)
type VirtualMemoryStatPrivider ¶
type VirtualMemoryStatPrivider struct{}
VirtualMemoryStatPrivider retrieves statistics data for memory
func (*VirtualMemoryStatPrivider) CheckData ¶
func (m *VirtualMemoryStatPrivider) CheckData(data []string, filter StatProviderFilter) bool
func (*VirtualMemoryStatPrivider) GetCode ¶
func (m *VirtualMemoryStatPrivider) GetCode() string
func (*VirtualMemoryStatPrivider) GetData ¶
func (m *VirtualMemoryStatPrivider) GetData() ([]string, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.