Documentation ¶
Overview ¶
Package collector includes all individual collectors to gather and export system metrics.
Index ¶
- Constants
- type Collector
- func NewBuddyinfoCollector() (Collector, error)
- func NewCPUCollector() (Collector, error)
- func NewDiskstatsCollector() (Collector, error)
- func NewFilesystemCollector() (Collector, error)
- func NewLoadavgCollector() (Collector, error)
- func NewMeminfoCollector() (Collector, error)
- func NewNetDevCollector() (Collector, error)
- func NewNtpCollector() (Collector, error)
- func NewRunitCollector() (Collector, error)
- func NewSupervisordCollector() (Collector, error)
- func NewTextFileCollector() (Collector, error)
- func NewTimeCollector() (Collector, error)
- type NodeCollector
Constants ¶
const ClocksPerSec = float64(C.CLK_TCK)
ClocksPerSec default value. from time.h
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface { // Get new metrics and expose them via prometheus registry. Update(ch chan<- prometheus.Metric) error }
Collector is the interface a collector has to implement.
func NewBuddyinfoCollector ¶
NewBuddyinfoCollector returns a new Collector exposing buddyinfo stats.
func NewCPUCollector ¶
NewCPUCollector returns a new Collector exposing CPU stats.
func NewDiskstatsCollector ¶
NewDiskstatsCollector returns a new Collector exposing disk device stats.
func NewFilesystemCollector ¶
NewFilesystemCollector returns a new Collector exposing filesystems stats.
func NewLoadavgCollector ¶
NewLoadavgCollector returns a new Collector exposing load average stats.
func NewMeminfoCollector ¶
NewMeminfoCollector returns a new Collector exposing memory stats.
func NewNetDevCollector ¶
NewNetDevCollector returns a new Collector exposing network device stats.
func NewNtpCollector ¶
NewNtpCollector returns a new Collector exposing sanity of local NTP server. Default definition of "local" is: - collector.ntp.server address is a loopback address (or collector.ntp.server-is-mine flag is turned on) - the server is reachable with outgoin IP_TTL = 1
func NewRunitCollector ¶
NewRunitCollector returns a new Collector exposing runit statistics.
func NewSupervisordCollector ¶
NewSupervisordCollector returns a new Collector exposing supervisord statistics.
func NewTextFileCollector ¶
NewTextFileCollector returns a new Collector exposing metrics read from files in the given textfile directory.
func NewTimeCollector ¶
NewTimeCollector returns a new Collector exposing the current system time in seconds since epoch.
type NodeCollector ¶
NodeCollector implements the prometheus.Collector interface.
func NewNodeCollector ¶
func NewNodeCollector(filters ...string) (*NodeCollector, error)
NewNodeCollector creates a new NodeCollector.
func (NodeCollector) Collect ¶
func (n NodeCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (NodeCollector) Describe ¶
func (n NodeCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
Source Files ¶
- boot_time_bsd.go
- buddyinfo.go
- collector.go
- cpu_common.go
- cpu_darwin.go
- diskstats_common.go
- diskstats_darwin.go
- filesystem_bsd.go
- filesystem_common.go
- helper.go
- loadavg.go
- loadavg_unix.go
- meminfo.go
- meminfo_darwin.go
- netdev_common.go
- netdev_darwin.go
- ntp.go
- paths.go
- runit.go
- supervisord.go
- sysctl_bsd.go
- textfile.go
- time.go
- uname.go
- uname_bsd.go