funcs

package
v0.0.0-...-b6b44b4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BuildMappers

func BuildMappers()

func CheckFS

func CheckFS(file string, content string) error

func Collect

func Collect()

func CollectorMetrics

func CollectorMetrics() []*dataobj.MetricValue

func CounterToGauge

func CounterToGauge(item *dataobj.MetricValue) error

func CounterValue

func CounterValue(metric string, val interface{}, tags ...string) *dataobj.MetricValue

func CpuContentSwitches

func CpuContentSwitches() float64

func CpuGuest

func CpuGuest() float64

func CpuIdle

func CpuIdle() float64

func CpuIowait

func CpuIowait() float64

func CpuIrq

func CpuIrq() float64

func CpuMetrics

func CpuMetrics() []*dataobj.MetricValue

func CpuNice

func CpuNice() float64

func CpuPrepared

func CpuPrepared() bool

func CpuSoftIrq

func CpuSoftIrq() float64

func CpuSteal

func CpuSteal() float64

func CpuSystem

func CpuSystem() float64

func CpuUser

func CpuUser() float64

func CurrentCpuSwitches

func CurrentCpuSwitches() uint64

func DeviceMetrics

func DeviceMetrics() []*dataobj.MetricValue

func EntityNumMetrics

func EntityNumMetrics() []*dataobj.MetricValue

func FsKernelMetrics

func FsKernelMetrics() []*dataobj.MetricValue

func FsRWMetrics

func FsRWMetrics() []*dataobj.MetricValue

func GaugeValue

func GaugeValue(metric string, val interface{}, tags ...string) *dataobj.MetricValue

func IODelta

func IODelta(device string, f func([2]*nux.DiskStats) uint64) uint64

func IOMsecRead

func IOMsecRead(arr [2]*nux.DiskStats) uint64

func IOMsecTotal

func IOMsecTotal(arr [2]*nux.DiskStats) uint64

func IOMsecWeightedTotal

func IOMsecWeightedTotal(arr [2]*nux.DiskStats) uint64

func IOMsecWrite

func IOMsecWrite(arr [2]*nux.DiskStats) uint64

func IOReadMerged

func IOReadMerged(arr [2]*nux.DiskStats) uint64

func IOReadRequests

func IOReadRequests(arr [2]*nux.DiskStats) uint64

func IOReadSectors

func IOReadSectors(arr [2]*nux.DiskStats) uint64

func IOStatsMetrics

func IOStatsMetrics() []*dataobj.MetricValue

func IOWriteMerged

func IOWriteMerged(arr [2]*nux.DiskStats) uint64

func IOWriteRequests

func IOWriteRequests(arr [2]*nux.DiskStats) uint64

func IOWriteSectors

func IOWriteSectors(arr [2]*nux.DiskStats) uint64

func InitRpcClients

func InitRpcClients()

func LoadAvgMetrics

func LoadAvgMetrics() []*dataobj.MetricValue

func MemMetrics

func MemMetrics() []*dataobj.MetricValue

func NetMetrics

func NetMetrics() (ret []*dataobj.MetricValue)

func NewMetricValue

func NewMetricValue(metric string, val interface{}, dataType string, tags ...string) *dataobj.MetricValue

func NfMetrics

func NfMetrics() []*dataobj.MetricValue

func NtpOffsetMetrics

func NtpOffsetMetrics() []*dataobj.MetricValue

func PrepareCpuStat

func PrepareCpuStat()

func PrepareDiskStats

func PrepareDiskStats()

func ProcsNumMetrics

func ProcsNumMetrics() []*dataobj.MetricValue

func Push

func Push(metricItems []*dataobj.MetricValue) error

func ShouldHandleDevice

func ShouldHandleDevice(device string) bool

func SocketStatSummaryMetrics

func SocketStatSummaryMetrics() []*dataobj.MetricValue

func TS

func TS(arr [2]*nux.DiskStats) uint64

func TcpMetrics

func TcpMetrics() []*dataobj.MetricValue

func UdpMetrics

func UdpMetrics() []*dataobj.MetricValue

func UpdateCpuStat

func UpdateCpuStat() error

func UpdateDiskStats

func UpdateDiskStats() error

Types

type CpuStats

type CpuStats struct {
	User    float64
	Nice    float64
	System  float64
	Idle    float64
	Iowait  float64
	Irq     float64
	SoftIrq float64
	Steal   float64
	Guest   float64
	Total   float64
}

func CpuIdles

func CpuIdles() (res []*CpuStats)

type CumIfStat

type CumIfStat struct {
	// contains filtered or unexported fields
}

type FuncsAndInterval

type FuncsAndInterval struct {
	Fs       []func() []*dataobj.MetricValue
	Interval int
}

type RpcClientContainer

type RpcClientContainer struct {
	M map[string]*rpc.Client
	sync.RWMutex
}

func (*RpcClientContainer) Del

func (rcc *RpcClientContainer) Del(addr string)

func (*RpcClientContainer) Get

func (rcc *RpcClientContainer) Get(addr string) *rpc.Client

func (*RpcClientContainer) Put

func (rcc *RpcClientContainer) Put(addr string, client *rpc.Client) bool

Put 返回的bool表示affected,确实把自己塞进去了

Jump to

Keyboard shortcuts

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