gomonop/pkg/status/status.go

22 lines
617 B
Go
Raw Permalink Normal View History

// The status package contains the datatype that corresponds to monitoring
// plugin status values.
package status // import nocternity.net/gomonop/pkg/status
// Status represents the return status of the monitoring plugin. The
// corresponding integer value will be used as the program's exit code,
// to be interpreted by the monitoring system.
type Status int
// Plugin exit statuses.
const (
StatusOK Status = iota
StatusWarning
StatusCritical
StatusUnknown
)
// String representations of the plugin statuses.
func (s Status) String() string {
return [...]string{"OK", "WARNING", "ERROR", "UNKNOWN"}[s]
}