From f5fb6736f60947ad493a0eac17b468177aa40139 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 17 Oct 2024 15:54:39 -0500 Subject: make STDOUT output easier to read Signed-off-by: Jeff Carr --- http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'http.go') diff --git a/http.go b/http.go index f0af65a..81266cc 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.State != "ON" { + if d.ConfigState != "ON" { continue } dur := time.Since(d.lastpoll) // Calculate the elapsed time if d.CurrentState != "ON" { - fmt.Fprintln(w, "BAD STATE ", d.Hostname, d.hname, "(", d.State, "vs", d.CurrentState, ")", shell.FormatDuration(dur)) + fmt.Fprintln(w, "BAD STATE ", d.Hostname, d.hname, "(", d.ConfigState, "vs", d.CurrentState, ")", shell.FormatDuration(dur)) } else { dur := time.Since(d.lastpoll) // Calculate the elapsed time fmt.Fprintln(w, "GOOD STATE ON", d.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.Hostname, "Last poll =", l) - //if d.State != "ON" { + //if d.ConfigState != "ON" { // continue //} // dur := time.Since(d.lastpoll) // Calculate the elapsed time -- cgit v1.2.3