Documentation ¶
Overview ¶
Package readers provides objects that gathers resource data from a host.
+build linux
+build linux
Index ¶
- func Register(name string, constructor func() IReader)
- type CpuInfo
- type CpuStat
- type DMI
- type Df
- type DiskIO
- type DiskPartitions
- type Du
- type Free
- type HostInfo
- type HostUsers
- type IOStat
- type IReader
- func NewCpuInfo() IReader
- func NewDMI() IReader
- func NewDf() IReader
- func NewDiskIO() IReader
- func NewDiskPartitions() IReader
- func NewDu() IReader
- func NewFree() IReader
- func NewGoStruct(name string) (IReader, error)
- func NewGoStructByConfig(config resourced_config.Config) (IReader, error)
- func NewHostInfo() IReader
- func NewHostUsers() IReader
- func NewIOStat() IReader
- func NewLoadAvg() IReader
- func NewNagiosPlugin() IReader
- func NewNetIO() IReader
- func NewNetInterfaces() IReader
- func NewPs() IReader
- func NewShell() IReader
- func NewUname() IReader
- func NewUptime() IReader
- type LoadAvg
- type NagiosPlugin
- type NetIO
- type NetInterfaces
- type Ps
- type Shell
- type Uname
- type Uptime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CpuInfo ¶
type CpuInfo struct {
Data map[string][]gopsutil_cpu.InfoStat
}
CpuInfo is a reader that scrapes cpu info data. Data source: https://github.com/shirou/gopsutil/tree/master/cpu
type CpuStat ¶
type CpuStat struct {
Data map[string][]gopsutil_cpu.TimesStat
}
CpuStat is a reader that scrapes cpu stat data. Data source: https://github.com/shirou/gopsutil/tree/master/cpu
type Df ¶
Df is a reader that scrapes disk free data and presents it in the form similar to `df`. Data source: https://github.com/cloudfoundry/gosigar/tree/master
type DiskIO ¶
type DiskIO struct {
Data map[string]gopsutil_disk.IOCountersStat
}
DiskIO is a reader that gathers disk io data. Data source: https://github.com/shirou/gopsutil/tree/master/disk
type DiskPartitions ¶
type DiskPartitions struct {
Data map[string]map[string]gopsutil_disk.PartitionStat
}
DiskPartitions is a reader that gathers partition data. Data source: https://github.com/shirou/gopsutil/tree/master/disk
func (*DiskPartitions) Run ¶
func (d *DiskPartitions) Run() error
Run gathers partition information from gopsutil.
func (*DiskPartitions) ToJson ¶
func (d *DiskPartitions) ToJson() ([]byte, error)
ToJson serialize Data field to JSON.
type Du ¶
Df is a reader that scrapes disk usage data and presents it in the form similar to `du`. Data sources: * https://github.com/cloudfoundry/gosigar/tree/master * https://github.com/shirou/gopsutil/tree/master/disk
type Free ¶
Free is a reader that scrapes swapory data and presents it in the form similar to `free`. Data source: https://github.com/cloudfoundry/gosigar/tree/master
type HostUsers ¶
type HostUsers struct {
Data map[string]gopsutil_host.UserStat
}
type IReader ¶
IReader is generic interface for all readers.
func NewDiskPartitions ¶
func NewDiskPartitions() IReader
NewDiskPartitions is DiskPartitions constructor.
func NewGoStructByConfig ¶
func NewGoStructByConfig(config resourced_config.Config) (IReader, error)
NewGoStructByConfig instantiates IReader given Config struct
func NewHostInfo ¶
func NewHostInfo() IReader
func NewHostUsers ¶
func NewHostUsers() IReader
func NewLoadAvg ¶
func NewLoadAvg() IReader
func NewNagiosPlugin ¶
func NewNagiosPlugin() IReader
func NewNetInterfaces ¶
func NewNetInterfaces() IReader
type LoadAvg ¶
type LoadAvg struct {
Data map[string]interface{}
}
type NagiosPlugin ¶
type NagiosPlugin struct {
Shell
}
func (*NagiosPlugin) Run ¶
func (s *NagiosPlugin) Run() error
Run NagiosPlugins out external program and store the output on c.Data.
func (*NagiosPlugin) ToJson ¶
func (s *NagiosPlugin) ToJson() ([]byte, error)
ToJson serialize Data field to JSON.
type NetIO ¶
type NetIO struct {
Data map[string]gopsutil_net.IOCountersStat
}
type NetInterfaces ¶
type NetInterfaces struct {
Data map[string]gopsutil_net.InterfaceStat
}
func (*NetInterfaces) Run ¶
func (n *NetInterfaces) Run() error
Run gathers network interfaces data from gopsutil.
func (*NetInterfaces) ToJson ¶
func (n *NetInterfaces) ToJson() ([]byte, error)
ToJson serialize Data field to JSON.
type Uname ¶
type Uname struct {
Data map[string]interface{}
}
Uname is a reader that returns uname data.
type Uptime ¶
type Uptime struct {
Data map[string]interface{}
}
Uptime is a reader that presents its data in the form similar to `uptime`. Data source: https://github.com/cloudfoundry/gosigar/tree/master
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package docker gathers Docker related data from a host.
|
Package docker gathers Docker related data from a host. |
Package haproxy gathers haproxy related data from a host.
|
Package haproxy gathers haproxy related data from a host. |
Package mcrouter gathers mcrouter related data from a host.
|
Package mcrouter gathers mcrouter related data from a host. |
Package memcache gathers memcache related data from a host.
|
Package memcache gathers memcache related data from a host. |
Package mysql gathers MySQL related data from a host.
|
Package mysql gathers MySQL related data from a host. |
Package redis gathers Redis related data from a host.
|
Package redis gathers Redis related data from a host. |