2024-07-19 23:50:50 +02:00
|
|
|
package plugin // import nocternity.net/gomonop/pkg/plugin
|
2024-07-19 23:24:19 +02:00
|
|
|
|
|
|
|
// 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 (
|
2024-07-19 23:24:52 +02:00
|
|
|
StatusOK Status = iota
|
|
|
|
StatusWarning
|
|
|
|
StatusCritical
|
|
|
|
StatusUnknown
|
2024-07-19 23:24:19 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// String representations of the plugin statuses.
|
|
|
|
func (s Status) String() string {
|
|
|
|
return [...]string{"OK", "WARNING", "ERROR", "UNKNOWN"}[s]
|
|
|
|
}
|