Documentation ¶
Index ¶
- type PerfData
- type PerfDataItem
- type RenderFormat
- type Result
- func (r *Result) Critical(format string, a ...any)
- func (r *Result) CriticalExit(format string, a ...any)
- func (r *Result) CriticalIfErr(err error, format string, a ...any) bool
- func (r *Result) Exit()
- func (r *Result) GenericExit()
- func (r *Result) Ok(format string, a ...any)
- func (r *Result) Pd(pd ...*PerfDataItem)
- func (r *Result) String() string
- func (r *Result) Warn(format string, a ...any)
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PerfData ¶
type PerfData []*PerfDataItem
type PerfDataItem ¶
type PerfDataItem struct { Help string `json:"-"` Name string `json:"name"` Value float64 `json:"value"` Warn float64 `json:"warning"` Crit float64 `json:"critical"` Unit string `json:"unit,omitempty"` }
func (*PerfDataItem) String ¶
func (i *PerfDataItem) String() string
type RenderFormat ¶
type RenderFormat int
const ( NagiosFormat RenderFormat = iota PrometheusFormat TextFormat JSONFormat )
type Result ¶
type Result struct { Output string `json:"output,omitempty"` Status Status `json:"status"` Check string `json:"check_suite"` Name string `json:"check_name"` Warnings []string `json:"warning,omitempty"` Criticals []string `json:"critical,omitempty"` OKs []string `json:"ok,omitempty"` PerfData PerfData `json:"perf_data"` RenderFormat RenderFormat `json:"-"` NameSpace string `json:"-"` OutFile string `json:"-"` }
func (*Result) CriticalExit ¶
func (*Result) CriticalIfErr ¶
func (*Result) GenericExit ¶
func (r *Result) GenericExit()
func (*Result) Pd ¶
func (r *Result) Pd(pd ...*PerfDataItem)
Click to show internal directories.
Click to hide internal directories.