collector

package
v0.0.0-...-4950972 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 42 Imported by: 3

Documentation

Overview

Package collector includes all individual collectors to gather and export system metrics.

Index

Constants

This section is empty.

Variables

View Source
var LogCollectorStore logCollectorStrore
View Source
var ProcessCacheObj processCache

Functions

func BusinessMonitorHttpHandle

func BusinessMonitorHttpHandle(w http.ResponseWriter, r *http.Request)

func LogMonitorHttpHandle

func LogMonitorHttpHandle(w http.ResponseWriter, r *http.Request)

func ProcessMonitorHttpHandle

func ProcessMonitorHttpHandle(w http.ResponseWriter, r *http.Request)

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 BusinessMonitorCollector

func BusinessMonitorCollector() (Collector, error)

func NewARPCollector

func NewARPCollector() (Collector, error)

NewARPCollector returns a new Collector exposing ARP stats.

func NewBcacheCollector

func NewBcacheCollector() (Collector, error)

NewBcacheCollector returns a newly allocated bcacheCollector. It exposes a number of Linux bcache statistics.

func NewBondingCollector

func NewBondingCollector() (Collector, error)

NewBondingCollector returns a newly allocated bondingCollector. It exposes the number of configured and active slave of linux bonding interfaces.

func NewBuddyinfoCollector

func NewBuddyinfoCollector() (Collector, error)

NewBuddyinfoCollector returns a new Collector exposing buddyinfo stats.

func NewCPUCollector

func NewCPUCollector() (Collector, error)

NewCPUCollector returns a new Collector exposing kernel/system statistics.

func NewCPUFreqCollector

func NewCPUFreqCollector() (Collector, error)

NewCPUFreqCollector returns a new Collector exposing kernel/system statistics.

func NewConntrackCollector

func NewConntrackCollector() (Collector, error)

NewConntrackCollector returns a new Collector exposing conntrack stats.

func NewDiskstatsCollector

func NewDiskstatsCollector() (Collector, error)

NewDiskstatsCollector returns a new Collector exposing disk device stats. Docs from https://www.kernel.org/doc/Documentation/iostats.txt

func NewEdacCollector

func NewEdacCollector() (Collector, error)

NewEdacCollector returns a new Collector exposing edac stats.

func NewEntropyCollector

func NewEntropyCollector() (Collector, error)

NewEntropyCollector returns a new Collector exposing entropy stats.

func NewFileFDStatCollector

func NewFileFDStatCollector() (Collector, error)

NewFileFDStatCollector returns a new Collector exposing file-nr stats.

func NewFilesystemCollector

func NewFilesystemCollector() (Collector, error)

NewFilesystemCollector returns a new Collector exposing filesystems stats.

func NewHwMonCollector

func NewHwMonCollector() (Collector, error)

NewHwMonCollector returns a new Collector exposing /sys/class/hwmon stats (similar to lm-sensors).

func NewIPVSCollector

func NewIPVSCollector() (Collector, error)

NewIPVSCollector sets up a new collector for IPVS metrics. It accepts the "procfs" config parameter to override the default proc location (/proc).

func NewInfiniBandCollector

func NewInfiniBandCollector() (Collector, error)

NewInfiniBandCollector returns a new Collector exposing InfiniBand stats.

func NewInterruptsCollector

func NewInterruptsCollector() (Collector, error)

NewInterruptsCollector returns a new Collector exposing interrupts stats.

func NewKsmdCollector

func NewKsmdCollector() (Collector, error)

NewKsmdCollector returns a new Collector exposing kernel/system statistics.

func NewLoadavgCollector

func NewLoadavgCollector() (Collector, error)

NewLoadavgCollector returns a new Collector exposing load average stats.

func NewLogMonitorCollector

func NewLogMonitorCollector() (Collector, error)

func NewLogindCollector

func NewLogindCollector() (Collector, error)

NewLogindCollector returns a new Collector exposing logind statistics.

func NewMdadmCollector

func NewMdadmCollector() (Collector, error)

NewMdadmCollector returns a new Collector exposing raid statistics.

func NewMeminfoCollector

func NewMeminfoCollector() (Collector, error)

NewMeminfoCollector returns a new Collector exposing memory stats.

func NewMeminfoNumaCollector

func NewMeminfoNumaCollector() (Collector, error)

NewMeminfoNumaCollector returns a new Collector exposing memory stats.

func NewMountStatsCollector

func NewMountStatsCollector() (Collector, error)

NewMountStatsCollector returns a new Collector exposing NFS statistics.

func NewNFSdCollector

func NewNFSdCollector() (Collector, error)

NewNFSdCollector returns a new Collector exposing /proc/net/rpc/nfsd statistics.

func NewNetClassCollector

func NewNetClassCollector() (Collector, error)

NewNetClassCollector returns a new Collector exposing network class stats.

func NewNetDevCollector

func NewNetDevCollector() (Collector, error)

NewNetDevCollector returns a new Collector exposing network device stats.

func NewNetStatCollector

func NewNetStatCollector() (Collector, error)

NewNetStatCollector takes and returns a new Collector exposing network stats.

func NewNfsCollector

func NewNfsCollector() (Collector, error)

NewNfsCollector returns a new Collector exposing NFS statistics.

func NewNtpCollector

func NewNtpCollector() (Collector, error)

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 NewPerfCollector

func NewPerfCollector() (Collector, error)

NewPerfCollector returns a new perf based collector, it creates a profiler per CPU.

func NewPressureStatsCollector

func NewPressureStatsCollector() (Collector, error)

NewPressureStatsCollector returns a Collector exposing pressure stall information

func NewProcessMonitorCollector

func NewProcessMonitorCollector() (Collector, error)

func NewProcessStatCollector

func NewProcessStatCollector() (Collector, error)

NewProcessStatCollector returns a new Collector exposing process data read from the proc filesystem.

func NewQdiscStatCollector

func NewQdiscStatCollector() (Collector, error)

NewQdiscStatCollector returns a new Collector exposing queuing discipline statistics.

func NewRunitCollector

func NewRunitCollector() (Collector, error)

NewRunitCollector returns a new Collector exposing runit statistics.

func NewSchedstatCollector

func NewSchedstatCollector() (Collector, error)

NewSchedstatCollector returns a new Collector exposing task scheduler statistics

func NewSockStatCollector

func NewSockStatCollector() (Collector, error)

NewSockStatCollector returns a new Collector exposing socket stats.

func NewStatCollector

func NewStatCollector() (Collector, error)

NewStatCollector returns a new Collector exposing kernel/system statistics.

func NewSupervisordCollector

func NewSupervisordCollector() (Collector, error)

NewSupervisordCollector returns a new Collector exposing supervisord statistics.

func NewSystemdCollector

func NewSystemdCollector() (Collector, error)

NewSystemdCollector returns a new Collector exposing systemd statistics.

func NewTCPStatCollector

func NewTCPStatCollector() (Collector, error)

NewTCPStatCollector returns a new Collector exposing network stats.

func NewTextFileCollector

func NewTextFileCollector() (Collector, error)

NewTextFileCollector returns a new Collector exposing metrics read from files in the given textfile directory.

func NewThermalZoneCollector

func NewThermalZoneCollector() (Collector, error)

NewThermalZoneCollector returns a new Collector exposing kernel/system statistics.

func NewTimeCollector

func NewTimeCollector() (Collector, error)

NewTimeCollector returns a new Collector exposing the current system time in seconds since epoch.

func NewTimexCollector

func NewTimexCollector() (Collector, error)

NewTimexCollector returns a new Collector exposing adjtime(3) stats.

func NewWifiCollector

func NewWifiCollector() (Collector, error)

NewWifiCollector returns a new Collector exposing Wifi statistics.

func NewXFSCollector

func NewXFSCollector() (Collector, error)

NewXFSCollector returns a new Collector exposing XFS statistics.

func NewZFSCollector

func NewZFSCollector() (Collector, error)

NewZFSCollector returns a new Collector exposing ZFS statistics.

func NewvmStatCollector

func NewvmStatCollector() (Collector, error)

NewvmStatCollector returns a new Collector exposing vmstat stats.

type NodeCollector

type NodeCollector struct {
	Collectors map[string]Collector
}

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.

Jump to

Keyboard shortcuts

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