Emmanuel BENOîT
1a29325c34
A "program" was in fact a plugin, while a "plugin" represented the plugin's results.
19 lines
519 B
Go
19 lines
519 B
Go
package results // import nocternity.net/gomonop/pkg/results
|
|
|
|
// 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]
|
|
}
|