19 lines
495 B
Go
19 lines
495 B
Go
package plugin // import nocternity.net/gomonop/pkg/perfdata
|
|
|
|
// 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 (
|
|
OK Status = iota
|
|
WARNING
|
|
CRITICAL
|
|
UNKNOWN
|
|
)
|
|
|
|
// String representations of the plugin statuses.
|
|
func (s Status) String() string {
|
|
return [...]string{"OK", "WARNING", "ERROR", "UNKNOWN"}[s]
|
|
}
|