diff options
Diffstat (limited to 'poll.go')
| -rw-r--r-- | poll.go | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 |
