Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionConfig ¶
type CollectionConfig struct {
MinPriority string `yaml:"min_priority"` // low | medium | high
}
CollectionConfig controls which metrics are collected (pre-filter by priority).
type CollectorCfg ¶
CollectorCfg holds per-collector configuration.
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server"`
Collectors map[string]CollectorCfg `yaml:"collectors"`
Storage StorageConfig `yaml:"storage"`
Health HealthConfig `yaml:"health"`
Stress stress.Config `yaml:"stress"`
Collection CollectionConfig `yaml:"collection"`
Features []string `yaml:"features"` // enabled features; daemon loads features/<name>/metrics.yaml overrides + derives C_comp from their intervals
FaultSub FaultSubConfig `yaml:"faultsub"`
StragglerOutput StragglerOutputConfig `yaml:"straggler_output"`
Snapshot SnapshotConfig `yaml:"snapshot"`
}
Config represents the full CATMonitor configuration.
type FaultSubConfig ¶
type FaultSubConfig struct {
Enabled bool `yaml:"enabled"` // opt-in switch
RestAddr string `yaml:"rest_addr"` // subscription REST API listen address
WebhookTimeout time.Duration `yaml:"webhook_timeout"` // per-request webhook timeout
WebhookRetry int `yaml:"webhook_retry"` // failed-webhook retry count
EventBuffer int `yaml:"event_buffer"` // recent-event ring buffer size
Defaults FaultSubDefaults `yaml:"defaults"`
Rules map[string]bool `yaml:"rules"`
}
FaultSubConfig controls the fault subscription & push mechanism (features/faultsub). When Enabled is false (the default) the daemon skips the feature entirely and behaves exactly as before.
type FaultSubDefaults ¶
type FaultSubDefaults struct {
DebounceMs int `yaml:"debounce_ms"`
MinSeverity string `yaml:"min_severity"`
}
FaultSubDefaults holds subscription defaults applied when a subscriber omits the corresponding field.
type HealthConfig ¶
type HealthConfig struct {
Enabled bool `yaml:"enabled"`
WeightScheme string `yaml:"weight_scheme"` // auto | cpu_only | accelerated_8card | accelerated_4card
}
HealthConfig holds health evaluation configuration. (Health is evaluated by the snapshot global writer at C_global; no separate health interval — removed dead config.) WeightScheme selects the scoring weights ("auto" detects gpu/npu).
type ServerConfig ¶
type ServerConfig struct {
Type string `yaml:"type"` // auto | cpu_only | accelerated
}
ServerConfig holds server-level configuration.
type SnapshotConfig ¶
type SnapshotConfig struct {
Enabled bool `yaml:"enabled"`
Dir string `yaml:"dir"` // directory for snapshot_<comp>.json + snapshot.json
}
SnapshotConfig controls daemon-side snapshot production (per-component files snapshot_<comp>.json + one global snapshot.json), consumed by read-only features (web/dfee). When Enabled is false (the default) the daemon writes no snapshot files and behaves exactly as before — this is the migration switch. When enabled, the daemon is the sole snapshot producer and web must run as a read-only consumer (no self-collection). The per-component history ring depth is fixed at 60 (not configurable).
type StorageConfig ¶
type StorageConfig struct {
DataDir string `yaml:"data_dir"`
MaxFileAge time.Duration `yaml:"max_file_age"`
Rotation string `yaml:"rotation"`
}
StorageConfig holds data storage configuration.
type StragglerOutputConfig ¶
type StragglerOutputConfig struct {
Enabled bool `yaml:"enabled"` // opt-in switch
DataDir string `yaml:"data_dir"` // KPI file directory
Retention time.Duration `yaml:"retention"` // file retention (default 15d)
FlushInterval time.Duration `yaml:"flush_interval"` // in-memory buffer flush cadence
Metrics []string `yaml:"metrics"` // which straggler fields to emit (empty=all)
}
StragglerOutputConfig controls the straggler-dedicated KPI file output (features/stragglerout). When Enabled is false (the default) the daemon skips the feature and no KPI file is produced.