watchdog for each hypervisor
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
d08d9f99be
commit
a6b385e216
1
README
1
README
|
@ -18,6 +18,7 @@ Notes & Goals:
|
|||
* Automatically map access to serial and graphical consoles
|
||||
* This is intended for managing Virtual Machines, not for containers
|
||||
* This often uses the DO nomenclature 'droplets' instead of 'virtual machines' or 'domU'
|
||||
* Every droplet is considered hostile
|
||||
* When possible, use protobuf
|
||||
* Let security be handled externally at the socket layer with other tools
|
||||
* Put network, cpu, etc stats in external tools
|
||||
|
|
11
main.go
11
main.go
|
@ -32,22 +32,21 @@ func main() {
|
|||
var h HyperT
|
||||
h.Hostname = s
|
||||
h.Autoscan = true
|
||||
h.Delay = 3 * time.Second
|
||||
h.Delay = 5 * time.Second
|
||||
h.Scan = func() {
|
||||
log.Info("scanned farm03?")
|
||||
h.pollHypervisor()
|
||||
}
|
||||
me.hypers = append(me.hypers, h)
|
||||
}
|
||||
go startHTTP()
|
||||
|
||||
log.Info("me.names =", me.names)
|
||||
for _, h := range me.hypers {
|
||||
log.Info("me hostname =", h.Hostname)
|
||||
if h.Hostname == "farm03" {
|
||||
log.Info("should start watchdog here for hostname =", h.Hostname)
|
||||
h.NewWatchdog()
|
||||
}
|
||||
log.Info("should start watchdog here for hostname =", h.Hostname)
|
||||
go h.NewWatchdog()
|
||||
}
|
||||
|
||||
// sit here
|
||||
startHTTP()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue