domino_admin_toolkit.analyzers.pod_cpu module

pydantic model domino_admin_toolkit.analyzers.pod_cpu.K8sPodCpuRequestsVsUsed

Bases: AnalyzerBase

Analyzes per-pod CPU requests versus actual sustained usage (avg over 1h).

FAILs when a pod’s CPU usage exceeds its requests by more than critical_excess_cores (default 2 cores). Uses avg (not peak) so transient spikes don’t trigger false failures.

Fields:
field critical_excess_cores: float = 2.0
analyze(data)

Analyzes the provided data and returns a list of CheckResult instances.

Return type:

list[CheckResult]

Args:

data (Dict[str, Any]): The data to be analyzed. The structure depends on the analyzer’s implementation.

Returns:

List[CheckResult]: A list containing the results of the analysis.

Raises:

NotImplementedError: If this method is not implemented by subclasses.

name: ClassVar[str] = 'K8sPodCpuRequestsVsUsed'
pydantic model domino_admin_toolkit.analyzers.pod_cpu.K8sPodCpuThrottling

Bases: AnalyzerBase

Analyzes per-pod CPU throttling percentage.

FAILs when a pod’s CPU throttle percentage exceeds critical_throttle_pct (default 50%). Uses the corrected formula: throttled_periods / total_periods * 100 (matches Grafana sizing guide dashboard — NOT throttled_seconds / throttled_periods).

Fields:
field critical_throttle_pct: float = 50.0
analyze(data)

Analyzes the provided data and returns a list of CheckResult instances.

Return type:

list[CheckResult]

Args:

data (Dict[str, Any]): The data to be analyzed. The structure depends on the analyzer’s implementation.

Returns:

List[CheckResult]: A list containing the results of the analysis.

Raises:

NotImplementedError: If this method is not implemented by subclasses.

name: ClassVar[str] = 'K8sPodCpuThrottling'