Documentation ¶
Index ¶
- type MockDiskUsage
- type MockPS
- func (m *MockPS) CPUTimes(_, _ bool) ([]cpu.TimesStat, error)
- func (m *MockPS) DiskIO(_ []string) (map[string]disk.IOCountersStat, error)
- func (m *MockPS) DiskUsage(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error)
- func (m *MockPS) LoadAvg() (*load.AvgStat, error)
- func (m *MockPS) NetConnections() ([]net.ConnectionStat, error)
- func (m *MockPS) NetIO() ([]net.IOCountersStat, error)
- func (m *MockPS) NetProto() ([]net.ProtoCountersStat, error)
- func (m *MockPS) SwapStat() (*mem.SwapMemoryStat, error)
- func (m *MockPS) Temperature() ([]host.TemperatureStat, error)
- func (m *MockPS) VMStat() (*mem.VirtualMemoryStat, error)
- type MockPSDisk
- type PS
- type PSDiskDeps
- type SystemPS
- func (s *SystemPS) CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error)
- func (s *SystemPS) DiskIO(names []string) (map[string]disk.IOCountersStat, error)
- func (s *SystemPS) DiskUsage(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error)
- func (s *SystemPS) NetConnections() ([]net.ConnectionStat, error)
- func (s *SystemPS) NetIO() ([]net.IOCountersStat, error)
- func (s *SystemPS) NetProto() ([]net.ProtoCountersStat, error)
- func (s *SystemPS) SwapStat() (*mem.SwapMemoryStat, error)
- func (s *SystemPS) Temperature() ([]host.TemperatureStat, error)
- func (s *SystemPS) VMStat() (*mem.VirtualMemoryStat, error)
- type SystemPSDisk
- type SystemStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDiskUsage ¶ added in v1.14.0
func (*MockDiskUsage) OSGetenv ¶ added in v1.14.0
func (m *MockDiskUsage) OSGetenv(key string) string
func (*MockDiskUsage) OSStat ¶ added in v1.14.0
func (m *MockDiskUsage) OSStat(name string) (os.FileInfo, error)
func (*MockDiskUsage) PSDiskUsage ¶ added in v1.14.0
func (m *MockDiskUsage) PSDiskUsage(path string) (*disk.UsageStat, error)
func (*MockDiskUsage) Partitions ¶ added in v1.14.0
func (m *MockDiskUsage) Partitions(all bool) ([]disk.PartitionStat, error)
type MockPS ¶
type MockPS struct { mock.Mock PSDiskDeps }
func (*MockPS) NetConnections ¶
func (m *MockPS) NetConnections() ([]net.ConnectionStat, error)
func (*MockPS) Temperature ¶ added in v1.14.0
func (m *MockPS) Temperature() ([]host.TemperatureStat, error)
type MockPSDisk ¶ added in v1.14.0
type PS ¶
type PS interface { CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error) DiskUsage(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error) NetIO() ([]net.IOCountersStat, error) NetProto() ([]net.ProtoCountersStat, error) DiskIO(names []string) (map[string]disk.IOCountersStat, error) VMStat() (*mem.VirtualMemoryStat, error) SwapStat() (*mem.SwapMemoryStat, error) NetConnections() ([]net.ConnectionStat, error) Temperature() ([]host.TemperatureStat, error) }
type PSDiskDeps ¶ added in v1.14.0
type SystemPS ¶ added in v1.14.0
type SystemPS struct { PSDiskDeps Log telegraf.Logger `toml:"-"` }
func NewSystemPS ¶ added in v1.14.0
func NewSystemPS() *SystemPS
func (*SystemPS) NetConnections ¶ added in v1.14.0
func (s *SystemPS) NetConnections() ([]net.ConnectionStat, error)
func (*SystemPS) NetProto ¶ added in v1.14.0
func (s *SystemPS) NetProto() ([]net.ProtoCountersStat, error)
func (*SystemPS) SwapStat ¶ added in v1.14.0
func (s *SystemPS) SwapStat() (*mem.SwapMemoryStat, error)
func (*SystemPS) Temperature ¶ added in v1.14.0
func (s *SystemPS) Temperature() ([]host.TemperatureStat, error)
type SystemPSDisk ¶ added in v1.14.0
type SystemPSDisk struct{}
func (*SystemPSDisk) OSGetenv ¶ added in v1.14.0
func (s *SystemPSDisk) OSGetenv(key string) string
func (*SystemPSDisk) OSStat ¶ added in v1.14.0
func (s *SystemPSDisk) OSStat(name string) (os.FileInfo, error)
func (*SystemPSDisk) PSDiskUsage ¶ added in v1.14.0
func (s *SystemPSDisk) PSDiskUsage(path string) (*disk.UsageStat, error)
func (*SystemPSDisk) Partitions ¶ added in v1.14.0
func (s *SystemPSDisk) Partitions(all bool) ([]disk.PartitionStat, error)
type SystemStats ¶
func (*SystemStats) Description ¶
func (*SystemStats) Description() string
func (*SystemStats) Gather ¶
func (s *SystemStats) Gather(acc telegraf.Accumulator) error
func (*SystemStats) SampleConfig ¶
func (*SystemStats) SampleConfig() string
Click to show internal directories.
Click to hide internal directories.