Versions in this module Expand all Collapse all v1 v1.5.5 May 18, 2020 Changes in this version + const CGroup — darwin/amd64, js/wasm, linux/amd64 + const CpuTimeRelated — darwin/amd64, js/wasm, linux/amd64 + const CpuTop10 — darwin/amd64, js/wasm, linux/amd64 + const CpuUsageRelated — darwin/amd64, js/wasm, linux/amd64 + const CtxSwitRelated — darwin/amd64, js/wasm, linux/amd64 + const DaemonTools — darwin/amd64, js/wasm, linux/amd64 + const Exe — darwin/amd64, js/wasm, linux/amd64 + const FileDescRelated — darwin/amd64, js/wasm, linux/amd64 + const IoRelated — darwin/amd64, js/wasm, linux/amd64 + const KeyDiskioAWait + const KeyDiskioIoUtil + const KeyDiskioMergedReadCount + const KeyDiskioMergedReadCountPerSec + const KeyDiskioMergedWriteCount + const KeyDiskioMergedWriteCountPerSec + const KeyDiskioReadAWait + const KeyDiskioReadBytesPerSec + const KeyDiskioReadsPerSec + const KeyDiskioWriteAWait + const KeyDiskioWriteBytesPerSec + const KeyDiskioWritesPerSec + const KeyNetBytesRecvPerSec + const KeyNetBytesSentPerSec + const KeyNetHWAddr + const KeyNetPacketsRecvPerSec + const KeyNetPacketsSentPerSec + const KeyProcessesBlocked — windows/amd64 + const KeyProcessesDead — windows/amd64 + const KeyProcessesIdle — windows/amd64 + const KeyProcessesPaging — windows/amd64 + const KeyProcessesRunning — windows/amd64 + const KeyProcessesSleeping — windows/amd64 + const KeyProcessesStopped — windows/amd64 + const KeyProcessesTotal — windows/amd64 + const KeyProcessesTotalThreads — windows/amd64 + const KeyProcessesUnknown — windows/amd64 + const KeyProcessesWait — windows/amd64 + const KeyProcessesZombies — windows/amd64 + const KeyProcstatStatus — darwin/amd64, js/wasm, linux/amd64 + const KeySystemNDisks + const KeySystemNNetCards + const KeySystemNServices + const MemRelated — darwin/amd64, js/wasm, linux/amd64 + const MemTop10 — darwin/amd64, js/wasm, linux/amd64 + const MetricCPUTotalKey — windows/amd64 + const MetricProcessesUsage — windows/amd64 + const Pattern — darwin/amd64, js/wasm, linux/amd64 + const PidFile — darwin/amd64, js/wasm, linux/amd64 + const ResourceLimits — darwin/amd64, js/wasm, linux/amd64 + const Self — darwin/amd64, js/wasm, linux/amd64 + const Supervisord — darwin/amd64, js/wasm, linux/amd64 + const SystemdUnit — darwin/amd64, js/wasm, linux/amd64 + const ThreadsRelated — darwin/amd64, js/wasm, linux/amd64 + const TypeMetricProcesses — windows/amd64 + const User — darwin/amd64, js/wasm, linux/amd64 + const WindowsCPUTotalKey — windows/amd64 + var KeyProcessesUsages = KeyValueSlice — windows/amd64 + var WinSystemUsages = KeyValueSlice — windows/amd64 + func NewCreator() metric.Collector — darwin/amd64, js/wasm, linux/amd64 type CPUStats — windows/amd64 + func (s *CPUStats) CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error) + type CollectInfo struct + BytesRecv uint64 + BytesSent uint64 + PacketsRecv uint64 + PacketsSent uint64 + type DarwinSystemStats struct — darwin/amd64 + func (s *DarwinSystemStats) Collect() (datas []map[string]interface{}, err error) + type DiskioCollectInfo struct + IoTime uint64 + MergedReadCount uint64 + MergedWriteCount uint64 + ReadBytes uint64 + ReadCount uint64 + ReadTime uint64 + WriteBytes uint64 + WriteCount uint64 + WriteTime uint64 + type LinuxSystemStats struct — linux/amd64 + func (s *LinuxSystemStats) Collect() (datas []map[string]interface{}, err error) type NetIOStats + InterfacesMap map[string]net.Interface + SkipProtoState bool + type ProcessInfo struct — darwin/amd64, js/wasm, linux/amd64 + Pid PID + Status int + func (p *ProcessInfo) Name() (string, error) + type Processes struct — windows/amd64 + func (*Processes) Config() map[string]interface{} + func (*Processes) Tags() []string + func (p *Processes) Collect() (datas []map[string]interface{}, err error) + func (p *Processes) Name() string + func (p *Processes) Usages() string type Procstat — darwin/amd64, js/wasm, linux/amd64 + Self bool + func (p *Procstat) SupervisordStat(process map[string]*ProcessInfo, processExist map[string]bool) (err error) + func (p *Procstat) SyncConfig(config map[string]interface{}, meta *reader.Meta) error + type WinSystemStats struct — windows/amd64 + func (*WinSystemStats) Collect() (datas []map[string]interface{}, err error) + func (s *WinSystemStats) Config() map[string]interface{} v1.4.7 Apr 17, 2018 Changes in this version + const ConfigDiskIgnoreFs + const ConfigDiskMountPoints + const ConfigDiskioDeviceTags + const ConfigDiskioDevices + const ConfigDiskioNameTemplates + const ConfigDiskioSkipSerialNumber + const CpuConfigCollectCpuTime + const CpuConfigPerCpu + const CpuConfigTotalCpu + const CpuTimeCPU + const CpuTimeGuest + const CpuTimeGuestNice + const CpuTimeIdle + const CpuTimeIowait + const CpuTimeIrq + const CpuTimeNice + const CpuTimeSoftirq + const CpuTimeSteal + const CpuTimeSystem + const CpuTimeUser + const CpuUsageCPU + const CpuUsageGuest + const CpuUsageGuestNice + const CpuUsageIdle + const CpuUsageIowait + const CpuUsageIrq + const CpuUsageNice + const CpuUsageSoftirq + const CpuUsageSteal + const CpuUsageSystem + const CpuUsageUser + const GoOSLinux + const GoOSMac + const GoOSWindows + const KernelBootTime — linux/amd64 + const KernelContextSwitches — linux/amd64 + const KernelDiskPagesIn — linux/amd64 + const KernelDiskPagesOut — linux/amd64 + const KernelInterrupts — linux/amd64 + const KernelProcessesForked — linux/amd64 + const KeyDiskDevice + const KeyDiskFree + const KeyDiskFstype + const KeyDiskInodesFree + const KeyDiskInodesTotal + const KeyDiskInodesUsed + const KeyDiskPath + const KeyDiskTotal + const KeyDiskUsed + const KeyDiskUsedPercent + const KeyDiskioIoTime + const KeyDiskioIopsInProgress + const KeyDiskioName + const KeyDiskioReadBytes + const KeyDiskioReadTime + const KeyDiskioReads + const KeyDiskioSerial + const KeyDiskioWriteBytes + const KeyDiskioWriteTime + const KeyDiskioWrites + const KeyLinuxSysctlFsAioMaxNr + const KeyLinuxSysctlFsAioNr + const KeyLinuxSysctlFsDentryNr + const KeyLinuxSysctlFsDentryUnNr + const KeyLinuxSysctlFsDentryWantPages + const KeyLinuxSysctlFsDetryAgeLimit + const KeyLinuxSysctlFsDquotMax + const KeyLinuxSysctlFsDquotNr + const KeyLinuxSysctlFsFileMax + const KeyLinuxSysctlFsFileNr + const KeyLinuxSysctlFsInodeFreeNr + const KeyLinuxSysctlFsInodeNr + const KeyLinuxSysctlFsInodePreNr + const KeyLinuxSysctlFsSuperMax + const KeyLinuxSysctlFsSuperNr + const KeyMemActive + const KeyMemAvailable + const KeyMemAvailablePercent + const KeyMemBuffered + const KeyMemCached + const KeyMemFree + const KeyMemInactive + const KeyMemTotal + const KeyMemUsed + const KeyMemUsedPercent + const KeyNetBytesRecv + const KeyNetBytesSent + const KeyNetDropIn + const KeyNetDropOut + const KeyNetErrIn + const KeyNetErrOut + const KeyNetInterface + const KeyNetPacketsRecv + const KeyNetPacketsSent + const KeyNetstatTcpClose + const KeyNetstatTcpCloseWait + const KeyNetstatTcpClosing + const KeyNetstatTcpEstablished + const KeyNetstatTcpFinWait1 + const KeyNetstatTcpFinWait2 + const KeyNetstatTcpLastAck + const KeyNetstatTcpListen + const KeyNetstatTcpNone + const KeyNetstatTcpSynRecv + const KeyNetstatTcpSynSent + const KeyNetstatTcpTimeWait + const KeyNetstatUdpSocket + const KeyProcessesBlocked — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesDead — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesIdle — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesPaging — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesRunning — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesSleeping — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesStopped — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesTotal — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesTotalThreads — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesUnknown — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesWait — darwin/amd64, js/wasm, linux/amd64 + const KeyProcessesZombies — darwin/amd64, js/wasm, linux/amd64 + const KeyProcstatCpuTime + const KeyProcstatCpuTimeGuest + const KeyProcstatCpuTimeGuestNice + const KeyProcstatCpuTimeIdle + const KeyProcstatCpuTimeIoWait + const KeyProcstatCpuTimeIrq + const KeyProcstatCpuTimeNice + const KeyProcstatCpuTimeSoftirq + const KeyProcstatCpuTimeSteal + const KeyProcstatCpuTimeStolen + const KeyProcstatCpuTimeSystem + const KeyProcstatCpuTimeUser + const KeyProcstatCpuUsage + const KeyProcstatFdsNum + const KeyProcstatFileLocks + const KeyProcstatInVolConSwitches + const KeyProcstatMemData + const KeyProcstatMemLocked + const KeyProcstatMemRss + const KeyProcstatMemStack + const KeyProcstatMemSwap + const KeyProcstatMemVms + const KeyProcstatNicePriority + const KeyProcstatPid + const KeyProcstatProcessName + const KeyProcstatReadBytes + const KeyProcstatReadCount + const KeyProcstatRealtimePriority + const KeyProcstatRlimitCpuTimeHard + const KeyProcstatRlimitCpuTimeSoft + const KeyProcstatRlimitFdsNumHard + const KeyProcstatRlimitFdsNumSoft + const KeyProcstatRlimitFileLocksHard + const KeyProcstatRlimitFileLocksSoft + const KeyProcstatRlimitMemDataHard + const KeyProcstatRlimitMemDataSoft + const KeyProcstatRlimitMemLockedHard + const KeyProcstatRlimitMemLockedSoft + const KeyProcstatRlimitMemRssHard + const KeyProcstatRlimitMemRssSoft + const KeyProcstatRlimitMemStackHard + const KeyProcstatRlimitMemStackSoft + const KeyProcstatRlimitMemVmsHard + const KeyProcstatRlimitMemVmsSoft + const KeyProcstatRlimitNicePriorityHard + const KeyProcstatRlimitNicePrioritySoft + const KeyProcstatRlimitRealtimePriorityHard + const KeyProcstatRlimitRealtimePrioritySoft + const KeyProcstatRlimitSignalsPendingHard + const KeyProcstatRlimitSignalsPendingSoft + const KeyProcstatSignalsPending + const KeyProcstatThreadsNum + const KeyProcstatVolConSwitches + const KeyProcstatWriteBytes + const KeyProcstatWriteCount + const KeySwapFree + const KeySwapIn + const KeySwapOut + const KeySwapTotal + const KeySwapUsed + const KeySwapUsedPercent + const KeySystemLoad1 + const KeySystemLoad15 + const KeySystemLoad5 + const KeySystemNCpus + const KeySystemNUsers + const KeySystemUptime + const KeySystemUptimeFormat + const MetricCpuUsages + const MetricDiskUsages + const MetricDiskioUsages + const MetricKernelUsages — linux/amd64 + const MetricKernelVmstatUsages — linux/amd64 + const MetricLinuxSysctlFsUsage + const MetricMemUsages + const MetricNetUsages + const MetricNetstatUsages + const MetricProcessesUsage — darwin/amd64, js/wasm, linux/amd64 + const MetricProcstatUsage + const MetricSwapUsages + const MetricSystemUsage + const TypeLinuxSysctlFs + const TypeMetricCpu + const TypeMetricDisk + const TypeMetricDiskio + const TypeMetricKernel — linux/amd64 + const TypeMetricKernelVmstat — linux/amd64 + const TypeMetricMem + const TypeMetricNet + const TypeMetricNetstat + const TypeMetricProcesses — darwin/amd64, js/wasm, linux/amd64 + const TypeMetricProcstat + const TypeMetricSwap + const TypeMetricSystem + var ConfigCpuUsages = []KeyValue + var ConfigDiskUsages = []KeyValue + var ConfigDiskioUsages = []KeyValue + var ConfigProcUsages = []models.Option + var KeyCpuUsages = []KeyValue + var KeyDiskUsages = []KeyValue + var KeyDiskioUsages = []KeyValue + var KeyKernelUsages = []KeyValue — linux/amd64 + var KeyLinuxSysctlFsUsage = []KeyValue + var KeyMemUsages = []KeyValue + var KeyNetStatUsages = []KeyValue + var KeyNetUsages = []KeyValue + var KeyProcUsages = []models.KeyValue + var KeyProcessesUsages = []KeyValue — darwin/amd64, js/wasm, linux/amd64 + var KeySwapUsages = []KeyValue + var KeySysctlFsFieldNameMap = map[string]string + var KeySystemUsages = []KeyValue + type CPUStats struct + CollectCPUTime bool + PerCPU bool + TotalCPU bool + func (_ *CPUStats) Config() map[string]interface{} + func (_ *CPUStats) Name() string + func (_ *CPUStats) Tags() []string + func (_ *CPUStats) Usages() string + func (s *CPUStats) Collect() (datas []map[string]interface{}, err error) + type DiskIOStats struct + DeviceTags []string + Devices []string + NameTemplates []string + SkipSerialNumber bool + func (_ *DiskIOStats) Config() map[string]interface{} + func (_ *DiskIOStats) Name() string + func (_ *DiskIOStats) Tags() []string + func (_ *DiskIOStats) Usages() string + func (s *DiskIOStats) Collect() (datas []map[string]interface{}, err error) + type DiskStats struct + IgnoreFS []string + MountPoints []string + func (_ *DiskStats) Config() map[string]interface{} + func (_ *DiskStats) Name() string + func (_ *DiskStats) Tags() []string + func (_ *DiskStats) Usages() string + func (s *DiskStats) Collect() (datas []map[string]interface{}, err error) + type Kernel struct — linux/amd64 + func (_ *Kernel) Tags() []string + func (k *Kernel) Collect() (datas []map[string]interface{}, err error) + func (k *Kernel) Config() map[string]interface{} + func (k *Kernel) Name() string + func (k *Kernel) Usages() string + type KernelVmstat struct — linux/amd64 + func (k *KernelVmstat) Collect() (datas []map[string]interface{}, err error) + func (k *KernelVmstat) Config() map[string]interface{} + func (k *KernelVmstat) Name() string + func (k *KernelVmstat) Tags() []string + func (k *KernelVmstat) Usages() string + type MemStats struct + func (_ *MemStats) Config() map[string]interface{} + func (_ *MemStats) Name() string + func (_ *MemStats) Tags() []string + func (_ *MemStats) Usages() string + func (s *MemStats) Collect() (datas []map[string]interface{}, err error) + type MockPS struct + func (m *MockPS) CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error) + func (m *MockPS) DiskIO(names []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) VMStat() (*mem.VirtualMemoryStat, error) + type MockPSDisk struct + func (s MockPSDisk) CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error) + func (s MockPSDisk) DiskIO(names []string) (map[string]disk.IOCountersStat, error) + func (s MockPSDisk) DiskUsage(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error) + func (s MockPSDisk) NetConnections() ([]net.ConnectionStat, error) + func (s MockPSDisk) NetIO() ([]net.IOCountersStat, error) + func (s MockPSDisk) NetProto() ([]net.ProtoCountersStat, error) + func (s MockPSDisk) SwapStat() (*mem.SwapMemoryStat, error) + func (s MockPSDisk) VMStat() (*mem.VirtualMemoryStat, error) + type NetIOStats struct + Interfaces []string + func (_ *NetIOStats) Config() map[string]interface{} + func (_ *NetIOStats) Name() string + func (_ *NetIOStats) Tags() []string + func (_ *NetIOStats) Usages() string + func (s *NetIOStats) Collect() (datas []map[string]interface{}, err error) + type NetStats struct + func (_ *NetStats) Config() map[string]interface{} + func (_ *NetStats) Name() string + func (_ *NetStats) Tags() []string + func (_ *NetStats) Usages() string + func (s *NetStats) Collect() (datas []map[string]interface{}, err error) + type PS interface + CPUTimes func(perCPU, totalCPU bool) ([]cpu.TimesStat, error) + DiskIO func(names []string) (map[string]disk.IOCountersStat, error) + DiskUsage func(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error) + NetConnections func() ([]net.ConnectionStat, error) + NetIO func() ([]net.IOCountersStat, error) + NetProto func() ([]net.ProtoCountersStat, error) + SwapStat func() (*mem.SwapMemoryStat, error) + VMStat func() (*mem.VirtualMemoryStat, error) + type PSDiskDeps interface + OSGetenv func(key string) string + OSStat func(name string) (os.FileInfo, error) + PSDiskUsage func(path string) (*disk.UsageStat, error) + Partitions func(all bool) ([]disk.PartitionStat, error) + type Processes struct — darwin/amd64, js/wasm, linux/amd64 + func (_ *Processes) Config() map[string]interface{} + func (_ *Processes) Tags() []string + func (p *Processes) Collect() (datas []map[string]interface{}, err error) + func (p *Processes) Name() string + func (p *Processes) Usages() string + type Procstat struct + CGroup string + CpuTimeRelated bool + CpuTop10 bool + CpuUsageRelated bool + CtxSwitRelated bool + DaemonTools bool + Exe string + FileDescRelated bool + IoRelated bool + MemRelated bool + MemTop10 bool + Pattern string + PidFile string + PidTag bool + Prefix string + ProcessName string + ResourceLimits bool + Supervisord bool + SystemdUnit string + ThreadsRelated bool + User string + func (p *Procstat) Collect() (datas []map[string]interface{}, err error) + func (p *Procstat) Config() map[string]interface{} + func (p *Procstat) Name() string + func (p *Procstat) PCpuTop10() (pids []PID, err error) + func (p *Procstat) PMemTop10() (pids []PID, err error) + func (p *Procstat) Tags() []string + func (p *Procstat) Usages() string + type SwapStats struct + func (_ *SwapStats) Config() map[string]interface{} + func (_ *SwapStats) Name() string + func (_ *SwapStats) Tags() []string + func (_ *SwapStats) Usages() string + func (s *SwapStats) Collect() (datas []map[string]interface{}, err error) + type SysctlFS struct + func (_ *SysctlFS) Config() map[string]interface{} + func (_ *SysctlFS) Name() string + func (_ *SysctlFS) Tags() []string + func (_ *SysctlFS) Usages() string + func (sfs *SysctlFS) Collect() (datas []map[string]interface{}, err error) + type SystemStats struct + func (_ *SystemStats) Collect() (datas []map[string]interface{}, err error) + func (_ *SystemStats) Name() string + func (_ *SystemStats) Tags() []string + func (_ *SystemStats) Usages() string + func (s *SystemStats) Config() map[string]interface{}