summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-27 11:02:50 -0500
committerJeff Carr <[email protected]>2024-10-27 11:02:50 -0500
commit8fc2fbd9c9a6f05852cd597b246f0b4e634af7d7 (patch)
tree707c6044781eb4ef1f3ed9c4b756f6e605e4b6c8 /http.go
parentd38865a6cf3d9e11803e9f565a0dd0c763de479d (diff)
track droplets reported from each hypervisor
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'http.go')
-rw-r--r--http.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/http.go b/http.go
index 937f9a7..2dddeb4 100644
--- a/http.go
+++ b/http.go
@@ -77,7 +77,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
}
if route == "/uptime" {
- ok, s := clusterHealthy()
+ ok, s := uptimeCheck()
if ok {
log.Info("Handling URL:", route, "cluster is ok", s)
fmt.Fprintln(w, s)
@@ -113,6 +113,18 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
return
}
+ // toggle poll logging
+ if route == "/poll" {
+ if POLL.Get() {
+ fmt.Fprintln(w, "POLL is true")
+ POLL.SetBool(false)
+ } else {
+ fmt.Fprintln(w, "POLL is false")
+ POLL.SetBool(true)
+ }
+ return
+ }
+
if route == "/dumpcluster" {
dumpCluster(w)
return
@@ -123,6 +135,11 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
return
}
+ if route == "/dumphypervisors" {
+ dumpHypervisors(w)
+ return
+ }
+
if route == "/dumplibvirtxml" {
virtigoxml.DumpLibvirtxmlDomainNames()
return