diff --git a/api/graylog.go b/api/graylog.go index 740ebe0..7a1f6dd 100644 --- a/api/graylog.go +++ b/api/graylog.go @@ -276,14 +276,12 @@ func NewStatusRequest() graylog.StatusRequest { } } - switch { - default: - combinedStatus = backends.StatusRunning - case stoppedCount != 0: - combinedStatus = backends.StatusStopped - fallthrough - case errorCount != 0: + if errorCount != 0 { combinedStatus = backends.StatusError + } else if stoppedCount != 0 { + combinedStatus = backends.StatusStopped + } else { + combinedStatus = backends.StatusRunning } statusMessage := strconv.Itoa(runningCount) + " running / " +