diff options
| author | Jeff Carr <[email protected]> | 2024-10-17 15:54:39 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-17 15:54:39 -0500 |
| commit | f5fb6736f60947ad493a0eac17b468177aa40139 (patch) | |
| tree | 5d4661357b67b9968f674b94413271f58aca0752 /http.go | |
| parent | c3a69690eee158e676d7ce7a5aa3088a1dc7fc7a (diff) | |
make STDOUT output easier to read
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |
