Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Started = false Opt Options ActiveStats *StatsType )
View Source
var DetectorFuncs = make([]DetectorFunc, 0)
DetectorFuncs detector functions
Functions ¶
func RegisterDetector ¶
func RegisterDetector(d DetectorFunc)
RegisterDetector register a new function to be called for detecting issues on the system
func SetLogLevel ¶
Types ¶
type DetectionResult ¶
type DetectionResult struct {
//Typ type of issue: bottleneck, risk, harm, lib-error
Typ string
//Id name of the issue. ex: low-available-cpu, disk-write-ceil
ID string
//Score how critical is this issue to the health of the system
Score float64
//Message text indicating the issue details
Message string
//Res resource directly related to the issue
Res Resource
//Related related resources to the issue (ex: for low CPU, place top 3 CPU processes)
Related []Resource
//InfoURL contains more information on how to deal with the issue
InfoURL string
//When time of detection process
When time.Time
}
DetectionResult detection results
func (*DetectionResult) String ¶
func (i *DetectionResult) String() string
type DetectorFunc ¶
type DetectorFunc func(*Options) []DetectionResult
DetectorFunc function that is called for detecting issues on the system
type Options ¶
type Options struct {
Loglevel string
HighCPUPercRange [2]float64
HighCPUWaitPercRange [2]float64
HighMemPercRange [2]float64
LowDiskPercRange [2]float64
LowFileHandlesPercRange [2]float64
FDUsedRange [2]float64
NICErrorsRange [2]float64
HighSwapBpsRange [2]float64
HighDiskUtilPercRange [2]float64
DefaultSampleFreq float64
DefaultTimeseriesSize time.Duration
CPULoadAvgDuration time.Duration
IORateLoadDuration time.Duration
MemAvgDuration time.Duration
MemLeakDuration time.Duration
IOLimitsSpan time.Duration
}
Options performance analysis options
type Resource ¶
type Resource struct {
//Typ resource type. ex: ram, disk, cpu, fs, net
Typ string
//Name identification of the resource in the system. ex: /dev/fda021, cpu:23, process:prometheus[6456]
Name string
//PropertyName name of the resource property. ex: available-cpu, disk-writes-per-second
PropertyName string
//PropertyValue value of the resource property
PropertyValue float64
}
Resource a computational resource
Source Files
¶
- bottleneck_cpu_iowait_high.go
- bottleneck_cpu_low_idle.go
- bottleneck_cpu_single_low_idle.go
- bottleneck_disk_on_limits.go
- bottleneck_mem_low.go
- bottleneck_net_on_limits copy.go
- detectors.go
- risk_disk_fd_low.go
- risk_disk_space_low.go
- risk_disk_util_high.go
- risk_mem_leak.go
- risk_mem_low.go
- risk_mem_swap_high.go
- risk_net_errors.go
Click to show internal directories.
Click to hide internal directories.