Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Probers = []ProbeFn{ sonus.ZoneProbe, sonus.ServerInfoMetrics, sonus.FanMetrics, sonus.PowerMetrics, sonus.DSPMetrics, } )
Functions ¶
func DebugOutput ¶
func DebugOutput(logBuffer *bytes.Buffer, registry *prometheus.Registry) string
DebugOutput returns plaintext debug output for a probe.
Types ¶
type ProbeFn ¶
type ProbeFn func(ctx context.Context, sbc *sonus.SBC, cfg *config.Config, registry *prometheus.Registry, logger log.Logger) error
A ProbeFn calls the SBC and adds its metrics to the registry
type ResultHistory ¶
type ResultHistory struct { MaxResults uint // contains filtered or unexported fields }
ResultHistory contains two history slices: `results` contains most recent `maxResults` results. After they expire out of `results`, failures will be saved in `preservedFailedResults`. This ensures that we are always able to see debug information about recent failures.
func (*ResultHistory) Add ¶
func (rh *ResultHistory) Add(moduleName, target, debugOutput string, success bool)
Add a result to the history.
func (*ResultHistory) Get ¶
func (rh *ResultHistory) Get(id int64) *Result
Get returns a given result.
func (*ResultHistory) List ¶
func (rh *ResultHistory) List() []*Result
List returns a list of all results.
Click to show internal directories.
Click to hide internal directories.