diagnostics

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPULoadRule

type CPULoadRule struct{}

CPULoadRule checks system load average against available logical CPU cores.

func (*CPULoadRule) Category

func (r *CPULoadRule) Category() string

func (*CPULoadRule) Evaluate

func (*CPULoadRule) ID

func (r *CPULoadRule) ID() string

func (*CPULoadRule) Name

func (r *CPULoadRule) Name() string

type CPURule

type CPURule struct{}

CPURule checks overall CPU utilization.

func (*CPURule) Category

func (r *CPURule) Category() string

func (*CPURule) Evaluate

func (r *CPURule) Evaluate(ctx context.Context, snapshot *model.SystemSnapshot, cfg *config.Config) model.DiagnosticResult

func (*CPURule) ID

func (r *CPURule) ID() string

func (*CPURule) Name

func (r *CPURule) Name() string

type DNSResolutionRule

type DNSResolutionRule struct{}

DNSResolutionRule tests DNS lookup latency and success.

func (*DNSResolutionRule) Category

func (r *DNSResolutionRule) Category() string

func (*DNSResolutionRule) Evaluate

func (*DNSResolutionRule) ID

func (r *DNSResolutionRule) ID() string

func (*DNSResolutionRule) Name

func (r *DNSResolutionRule) Name() string

type DiskSpaceRule

type DiskSpaceRule struct{}

DiskSpaceRule checks all mounted disk partitions for capacity thresholds.

func (*DiskSpaceRule) Category

func (r *DiskSpaceRule) Category() string

func (*DiskSpaceRule) Evaluate

func (*DiskSpaceRule) ID

func (r *DiskSpaceRule) ID() string

func (*DiskSpaceRule) Name

func (r *DiskSpaceRule) Name() string

type DockerHealthRule

type DockerHealthRule struct{}

DockerHealthRule checks Docker container status if Docker is running.

func (*DockerHealthRule) Category

func (r *DockerHealthRule) Category() string

func (*DockerHealthRule) Evaluate

func (*DockerHealthRule) ID

func (r *DockerHealthRule) ID() string

func (*DockerHealthRule) Name

func (r *DockerHealthRule) Name() string

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine executes system diagnostic rules and aggregates health status.

func NewEngine

func NewEngine(cfg *config.Config) *Engine

NewEngine creates a new diagnostic engine with default built-in rules.

func (*Engine) RegisterRule

func (e *Engine) RegisterRule(r Rule)

RegisterRule registers a custom or additional diagnostic rule.

func (*Engine) Run

Run executes all registered diagnostic checks against a snapshot.

type InodeRule

type InodeRule struct{}

InodeRule checks inode exhaustion on Unix filesystems.

func (*InodeRule) Category

func (r *InodeRule) Category() string

func (*InodeRule) Evaluate

func (r *InodeRule) Evaluate(ctx context.Context, snapshot *model.SystemSnapshot, cfg *config.Config) model.DiagnosticResult

func (*InodeRule) ID

func (r *InodeRule) ID() string

func (*InodeRule) Name

func (r *InodeRule) Name() string

type MemoryRule

type MemoryRule struct{}

MemoryRule checks RAM utilization and available memory.

func (*MemoryRule) Category

func (r *MemoryRule) Category() string

func (*MemoryRule) Evaluate

func (r *MemoryRule) Evaluate(ctx context.Context, snapshot *model.SystemSnapshot, cfg *config.Config) model.DiagnosticResult

func (*MemoryRule) ID

func (r *MemoryRule) ID() string

func (*MemoryRule) Name

func (r *MemoryRule) Name() string

type NetworkConnectivityRule

type NetworkConnectivityRule struct{}

NetworkConnectivityRule tests external TCP connectivity to reliable public endpoints.

func (*NetworkConnectivityRule) Category

func (r *NetworkConnectivityRule) Category() string

func (*NetworkConnectivityRule) Evaluate

func (*NetworkConnectivityRule) ID

func (*NetworkConnectivityRule) Name

func (r *NetworkConnectivityRule) Name() string

type ProcessHealthRule

type ProcessHealthRule struct{}

ProcessHealthRule inspects processes for zombies and rogue CPU/memory hogs.

func (*ProcessHealthRule) Category

func (r *ProcessHealthRule) Category() string

func (*ProcessHealthRule) Evaluate

func (*ProcessHealthRule) ID

func (r *ProcessHealthRule) ID() string

func (*ProcessHealthRule) Name

func (r *ProcessHealthRule) Name() string

type Rule

type Rule interface {
	ID() string
	Category() string
	Name() string
	Evaluate(ctx context.Context, snapshot *model.SystemSnapshot, cfg *config.Config) model.DiagnosticResult
}

Rule represents a single diagnostic evaluation rule.

type SwapRule

type SwapRule struct{}

SwapRule checks swap utilization.

func (*SwapRule) Category

func (r *SwapRule) Category() string

func (*SwapRule) Evaluate

func (r *SwapRule) Evaluate(ctx context.Context, snapshot *model.SystemSnapshot, cfg *config.Config) model.DiagnosticResult

func (*SwapRule) ID

func (r *SwapRule) ID() string

func (*SwapRule) Name

func (r *SwapRule) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL