Documentation ¶
Index ¶
- func ByteCountIECConvert(b uint64, e string) float64
- func ByteCountSIConvert(b uint64, e string) float64
- func ConvertToUnit(b uint64, e string) float64
- func HandleCPU(cv config.Values) interface{}
- func HandleDisks(cv config.Values) interface{}
- func HandleDocker(cv config.Values) interface{}
- func HandleInodes(cv config.Values) interface{}
- func HandleLoad(cv config.Values) interface{}
- func HandleMemory(cv config.Values) interface{}
- func HandleNetworks(cv config.Values) interface{}
- func HandlePlugins(cv config.Values) interface{}
- func HandleProcesses(cv config.Values) interface{}
- func HandleServices(cv config.Values) interface{}
- func HandleSwap(cv config.Values) interface{}
- func HandleSystem(cv config.Values) interface{}
- func HandleTemps(cv config.Values) interface{}
- func HandleUsers(cv config.Values) interface{}
- func HandleVersion(cv config.Values) interface{}
- func Setup()
- type CPUStatus
- type CheckResult
- type Checkable
- type CheckableAgainst
- type CheckableExtra
- type Disk
- type Inodes
- type Interface
- type InterfaceDelta
- type InterfaceDeltaStat
- type Load
- type MemoryStatus
- type Plugin
- type PluginResults
- type Process
- type ProcessList
- type Service
- type SwapStatus
- type Users
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteCountIECConvert ¶
func ByteCountSIConvert ¶
func ConvertToUnit ¶
func HandleDisks ¶
func HandleDocker ¶
func HandleInodes ¶
func HandleLoad ¶
func HandleMemory ¶
func HandleNetworks ¶
Get a whole list of interfaces
func HandlePlugins ¶
func HandleProcesses ¶
func HandleServices ¶
func HandleSwap ¶
func HandleSystem ¶
func HandleTemps ¶
func HandleUsers ¶
func HandleVersion ¶
Types ¶
type CPUStatus ¶
type CPUStatus struct { Percent []float64 `json:"percent"` Units string `json:"units"` // contains filtered or unexported fields }
func (CPUStatus) CheckValue ¶
func (CPUStatus) LongOutput ¶
type CheckResult ¶
type CheckResult struct { Exitcode int `json:"exitcode"` Output string `json:"output"` Perfdata string `json:"perfdata"` LongOutput string `json:"longoutput"` }
func GetCheckAgainstResult ¶
func GetCheckAgainstResult(chk CheckableAgainst, e string) CheckResult
func GetCheckResult ¶
func GetCheckResult(chk Checkable, w, c string) CheckResult
func (*CheckResult) String ¶
func (c *CheckResult) String() string
type CheckableAgainst ¶
type CheckableExtra ¶
type CheckableExtra interface {
LongOutput() string
}
type Disk ¶
type Disk struct { Path string `json:"path"` Device string `json:"device"` Fstype string `json:"fstype"` Total float64 `json:"total"` Free float64 `json:"free"` Used float64 `json:"used"` UsedPercent float64 `json:"usedPercent"` Units string `json:"units"` }
func (Disk) CheckValue ¶
type Inodes ¶
type Inodes struct { Path string `json:"path"` Device string `json:"device"` Fstype string `json:"fstype"` Total float64 `json:"total"` Used float64 `json:"used"` Free float64 `json:"free"` UsedPercent float64 `json:"usedPercent"` }
func (Inodes) CheckValue ¶
type Interface ¶
type Interface struct { HardwareAddr string `json:"hardwareAddr"` Addrs net.InterfaceAddrList `json:"addrs"` net.IOCountersStat // contains filtered or unexported fields }
type InterfaceDelta ¶
type InterfaceDelta struct { HardwareAddr string `json:"hardwareAddr"` Addrs net.InterfaceAddrList `json:"addrs"` net.IOCountersStat InterfaceDeltaStat }
type InterfaceDeltaStat ¶ added in v1.0.3
type InterfaceDeltaStat struct { OutTotal float64 `json:"outTotal"` OutPerSec float64 `json:"outPerSec"` InTotal float64 `json:"inTotal"` InPerSec float64 `json:"inPerSec"` Units string `json:"units"` // contains filtered or unexported fields }
func (InterfaceDeltaStat) CheckValue ¶ added in v1.0.3
func (i InterfaceDeltaStat) CheckValue() float64
func (InterfaceDeltaStat) PerfData ¶ added in v1.0.3
func (i InterfaceDeltaStat) PerfData(warn, crit string) string
func (InterfaceDeltaStat) String ¶ added in v1.0.3
func (i InterfaceDeltaStat) String() string
type Load ¶
type Load struct { Load1 float64 `json:"load1"` Load5 float64 `json:"load5"` Load15 float64 `json:"load15"` // contains filtered or unexported fields }
func (Load) CheckValue ¶
type MemoryStatus ¶
type MemoryStatus struct { Total float64 `json:"total"` Available float64 `json:"available"` Free float64 `json:"free"` Used float64 `json:"used"` UsedPercent float64 `json:"usedPercent"` Units string `json:"units"` }
func (MemoryStatus) CheckValue ¶
func (m MemoryStatus) CheckValue() float64
func (MemoryStatus) PerfData ¶
func (m MemoryStatus) PerfData(warn, crit string) string
func (MemoryStatus) String ¶
func (m MemoryStatus) String() string
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Run ¶
func (p *Plugin) Run() PluginResults
type PluginResults ¶
type ProcessList ¶
func (ProcessList) CheckValue ¶
func (p ProcessList) CheckValue() float64
func (ProcessList) PerfData ¶
func (p ProcessList) PerfData(warn, crit string) string
func (ProcessList) String ¶
func (p ProcessList) String() string
type Service ¶
type Service struct { Name string `json:"name"` Status string `json:"status"` // contains filtered or unexported fields }
func (Service) CheckValue ¶
type SwapStatus ¶
type SwapStatus struct { Total float64 `json:"total"` Free float64 `json:"free"` Used float64 `json:"used"` UsedPercent float64 `json:"usedPercent"` Units string `json:"units"` }
func (SwapStatus) CheckValue ¶
func (s SwapStatus) CheckValue() float64
func (SwapStatus) PerfData ¶
func (s SwapStatus) PerfData(warn, crit string) string
func (SwapStatus) String ¶
func (s SwapStatus) String() string
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
func (Users) CheckValue ¶
Click to show internal directories.
Click to hide internal directories.