Add per-node health checks with status indicators and scheduled probes.
This commit is contained in:
@@ -105,6 +105,14 @@ type Node struct {
|
||||
PublicKey string `json:"public_key"`
|
||||
KeyAlgo string `json:"key_algo"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
|
||||
// Health check configuration and last result (persisted).
|
||||
HealthCheckIntervalSeconds int `json:"health_check_interval_seconds"`
|
||||
HealthLastCheckedAt *time.Time `json:"health_last_checked_at,omitempty"`
|
||||
HealthPingOK *bool `json:"health_ping_ok,omitempty"`
|
||||
HealthSSHOK *bool `json:"health_ssh_ok,omitempty"`
|
||||
HealthOK *bool `json:"health_ok,omitempty"`
|
||||
HealthMessage string `json:"health_message,omitempty"`
|
||||
}
|
||||
|
||||
// NodeStore is the plain JSON payload in nodes.json.
|
||||
@@ -284,10 +292,11 @@ type NodeKeyStore struct {
|
||||
type NodeAuditAction string
|
||||
|
||||
const (
|
||||
NodeAuditActionCreate NodeAuditAction = "create"
|
||||
NodeAuditActionDelete NodeAuditAction = "delete"
|
||||
NodeAuditActionTestSSH NodeAuditAction = "test_ssh"
|
||||
NodeAuditActionUpdate NodeAuditAction = "update"
|
||||
NodeAuditActionCreate NodeAuditAction = "create"
|
||||
NodeAuditActionDelete NodeAuditAction = "delete"
|
||||
NodeAuditActionTestSSH NodeAuditAction = "test_ssh"
|
||||
NodeAuditActionHealthCheck NodeAuditAction = "health_check"
|
||||
NodeAuditActionUpdate NodeAuditAction = "update"
|
||||
)
|
||||
|
||||
// NodeAuditEvent is one append-only record of a node mutation.
|
||||
|
||||
Reference in New Issue
Block a user