summaryrefslogtreecommitdiff
path: root/poll.go
diff options
context:
space:
mode:
Diffstat (limited to 'poll.go')
-rw-r--r--poll.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/poll.go b/poll.go
index f7f2414..981bf86 100644
--- a/poll.go
+++ b/poll.go
@@ -136,8 +136,17 @@ func clusterHealthy() (bool, string) {
}
summary = strings.TrimSpace(summary)
summary += ")"
- summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")"
+ if me.killcount > 0 {
+ summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")"
+ }
+ last := time.Since(me.stable)
+ if last > 133*time.Second {
+ // the cluster has not been stable for 10 seconds
+ s := shell.FormatDuration(last)
+ summary += "(unstable " + s + ")"
+ }
if good {
+ me.stable = time.Now()
return good, "GOOD=true " + summary
}
return good, "GOOD=false " + summary