summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/http.go b/http.go
index 158d346..be4a8c0 100644
--- a/http.go
+++ b/http.go
@@ -23,12 +23,12 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
// is the cluster running what it should?
if tmp == "/droplets" {
for _, d := range me.droplets {
- if d.ConfigState != "ON" {
+ if d.pb.StartState != "ON" {
continue
}
dur := time.Since(d.lastpoll) // Calculate the elapsed time
if d.CurrentState != "ON" {
- fmt.Fprintln(w, "BAD STATE ", d.pb.Hostname, d.hname, "(", d.ConfigState, "vs", d.CurrentState, ")", shell.FormatDuration(dur))
+ fmt.Fprintln(w, "BAD STATE ", d.pb.Hostname, d.hname, "(", d.pb.StartState, "vs", d.CurrentState, ")", shell.FormatDuration(dur))
} else {
dur := time.Since(d.lastpoll) // Calculate the elapsed time
fmt.Fprintln(w, "GOOD STATE ON", d.pb.Hostname, d.hname, shell.FormatDuration(dur))
@@ -65,7 +65,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
}
// l := shell.FormatDuration(dur)
// log.Warn("HOST =", h.pb.Hostname, "Last poll =", l)
- //if d.ConfigState != "ON" {
+ //if d.pb.StartState != "ON" {
// continue
//}
// dur := time.Since(d.lastpoll) // Calculate the elapsed time