diff options
| author | Jeff Carr <[email protected]> | 2024-10-13 03:20:48 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-13 03:20:48 -0500 |
| commit | ffe754a96a68e7cf8905344073e3b1eedb78e94b (patch) | |
| tree | edb7819d879fc42ca88a78d7f6c7c6b202bf1843 | |
| parent | e149b3218d26b4996fc76072145efda6eb9f9856 (diff) | |
track the global killcount of virtigod restarts
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | event.go | 1 | ||||
| -rw-r--r-- | poll.go | 1 | ||||
| -rw-r--r-- | structs.go | 7 |
3 files changed, 6 insertions, 3 deletions
@@ -20,4 +20,5 @@ func (h *HyperT) RestartDaemon() { dur := time.Since(h.lastpoll) // Calculate the elapsed time log.Info("KILLED DAEMON", h.Hostname, shell.FormatDuration(dur), "curl", url) + me.killcount += 1 } @@ -136,6 +136,7 @@ func clusterHealthy() (bool, string) { } summary = strings.TrimSpace(summary) summary += ")" + summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")" if good { return good, "GOOD=true " + summary } @@ -16,9 +16,10 @@ func (b *virtigoT) Enable() { // this app's variables type virtigoT struct { - names []string - hypers []*HyperT - droplets []*DropletT + names []string + hypers []*HyperT + droplets []*DropletT + killcount int } // the stuff that is needed for a hypervisor |
