track the global killcount of virtigod restarts
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
e149b3218d
commit
ffe754a96a
1
event.go
1
event.go
|
@ -20,4 +20,5 @@ func (h *HyperT) RestartDaemon() {
|
||||||
|
|
||||||
dur := time.Since(h.lastpoll) // Calculate the elapsed time
|
dur := time.Since(h.lastpoll) // Calculate the elapsed time
|
||||||
log.Info("KILLED DAEMON", h.Hostname, shell.FormatDuration(dur), "curl", url)
|
log.Info("KILLED DAEMON", h.Hostname, shell.FormatDuration(dur), "curl", url)
|
||||||
|
me.killcount += 1
|
||||||
}
|
}
|
||||||
|
|
1
poll.go
1
poll.go
|
@ -136,6 +136,7 @@ func clusterHealthy() (bool, string) {
|
||||||
}
|
}
|
||||||
summary = strings.TrimSpace(summary)
|
summary = strings.TrimSpace(summary)
|
||||||
summary += ")"
|
summary += ")"
|
||||||
|
summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")"
|
||||||
if good {
|
if good {
|
||||||
return good, "GOOD=true " + summary
|
return good, "GOOD=true " + summary
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,10 @@ func (b *virtigoT) Enable() {
|
||||||
|
|
||||||
// this app's variables
|
// this app's variables
|
||||||
type virtigoT struct {
|
type virtigoT struct {
|
||||||
names []string
|
names []string
|
||||||
hypers []*HyperT
|
hypers []*HyperT
|
||||||
droplets []*DropletT
|
droplets []*DropletT
|
||||||
|
killcount int
|
||||||
}
|
}
|
||||||
|
|
||||||
// the stuff that is needed for a hypervisor
|
// the stuff that is needed for a hypervisor
|
||||||
|
|
Loading…
Reference in New Issue