Versions in this module Expand all Collapse all v1 v1.1.1 Mar 11, 2023 Changes in this version + const BAD + const CRITICAL + const DOWN + const ERROR + const OK + const UNKNOWN + const UP + const WARNING + var ErrNoSuchEntryError = errors.New("no such element exists") + var SchemaJSON = []byte(...) + func Checks(n *nagios.Nagios, maxAge int64, checkMap []interface{}, noisy bool) + func Metrics(n *nagios.Nagios, checkMap []interface{}, noisy bool) + func SafeLabel(label string) string + func ValidateJSON(jsonBody string) error + type Check struct + Metrics []Status + OverallStatus string + Properties map[string]interface{} + Services []Status + Systems []Status + func NewCheck() Check + func NewCheckfromJSON(hcjson []byte) (Check, error) + func (s *Check) AddMetric(status *Status) + func (s *Check) AddService(status *Status) + func (s *Check) AddSystem(status *Status) + func (s *Check) Calculate() + func (s *Check) JSON() string + func (s *Check) Merge(hc *Check) + func (s *Check) PrefixedMerge(prefix string, hc *Check) + func (s *Check) Terse() string + func (s *Check) Validate() error + type JSON map[string]interface + type Status struct + BadOver interface{} + ExpectedValue interface{} + Name string + Status string + Suffix string + TimeOut *time.Duration + TimeStamp *time.Time + Value interface{} + WarnOver interface{} + func StatusSliceFromJmap(jmap []interface{}) []Status + func (s *Status) MarshalJSON() ([]byte, error) + func (s *Status) MetricString() string + type StatusRegistry struct + func NewStatusRegistry() *StatusRegistry + func (s *StatusRegistry) Add(name, status string, Value, ExpectedValue interface{}) + func (s *StatusRegistry) Get(name string) (*Status, error) + func (s *StatusRegistry) Keys() []string + func (s *StatusRegistry) Remove(name string) + type StatusString = string