Add per-node health checks with status indicators and scheduled probes.

This commit is contained in:
2026-07-19 22:40:21 +02:00
parent 5307ba1a7b
commit aac9e82766
20 changed files with 1674 additions and 65 deletions
+13 -4
View File
@@ -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.