Documentation
¶
Index ¶
Constants ¶
View Source
const Name = "node-health"
Name is the registry key for this scanner.
Variables ¶
This section is empty.
Functions ¶
func NewScanner ¶
NewScanner returns a scanner that checks node health conditions.
Types ¶
type Data ¶
type Data struct {
// NodeCount is the total number of nodes.
NodeCount int `json:"node_count"`
// HealthyNodes is how many nodes are Ready with no pressure conditions.
HealthyNodes int `json:"healthy_nodes"`
// UnhealthyNodes is how many nodes have at least one pressure condition or are not ready.
UnhealthyNodes int `json:"unhealthy_nodes"`
// MemoryPressureNodes is how many nodes report MemoryPressure=True.
MemoryPressureNodes int `json:"memory_pressure_nodes"`
// DiskPressureNodes is how many nodes report DiskPressure=True.
DiskPressureNodes int `json:"disk_pressure_nodes"`
// PIDPressureNodes is how many nodes report PIDPressure=True.
PIDPressureNodes int `json:"pid_pressure_nodes"`
// NotReadyNodes is how many nodes report Ready!=True.
NotReadyNodes int `json:"not_ready_nodes"`
// UnschedulableNodes is how many nodes are cordoned.
UnschedulableNodes int `json:"unschedulable_nodes"`
// Nodes lists per-node health details.
Nodes []NodeHealth `json:"nodes"`
}
Data holds node health information for one cluster.
type NodeCondition ¶
type NodeCondition struct {
// Type is the condition type (Ready, MemoryPressure, DiskPressure, PIDPressure, NetworkUnavailable).
Type string `json:"type"`
// Status is True, False, or Unknown.
Status string `json:"status"`
// Reason is the machine-readable reason string.
Reason string `json:"reason,omitempty"`
// Message is the human-readable message.
Message string `json:"message,omitempty"`
}
NodeCondition describes a condition on a single node.
type NodeHealth ¶
type NodeHealth struct {
// Name is the node name.
Name string `json:"name"`
// Ready is true when the node reports Ready=True.
Ready bool `json:"ready"`
// MemoryPressure is true when the node reports MemoryPressure=True.
MemoryPressure bool `json:"memory_pressure"`
// DiskPressure is true when the node reports DiskPressure=True.
DiskPressure bool `json:"disk_pressure"`
// PIDPressure is true when the node reports PIDPressure=True.
PIDPressure bool `json:"pid_pressure"`
NetworkUnavailable bool `json:"network_unavailable"`
// Unschedulable is true when the node is cordoned.
Unschedulable bool `json:"unschedulable"`
// Conditions lists all conditions for detailed inspection.
Conditions []NodeCondition `json:"conditions"`
}
NodeHealth describes the health posture of a single node.
Click to show internal directories.
Click to hide internal directories.