# 05 — Collectors Collectors live in `internal/collector/`. Core files: - `registry.go` for protocol registration - `redfish.go` for live collection - `redfish_replay.go` for replay from raw payloads - `ipmi_mock.go` for the placeholder IPMI implementation - `types.go` for request/progress contracts ## Redfish collector Status: active production path. Request fields passed from the server: - `host` - `port` - `username` - `auth_type` - credential field (`password` or token) - `tls_mode` ### Core rule Live collection and replay must stay behaviorally aligned. If the collector adds a fallback, probe, or normalization rule, replay must mirror it. ### Discovery model The collector does not rely on one fixed vendor tree. It discovers and follows Redfish resources dynamically from root collections such as: - `Systems` - `Chassis` - `Managers` ### Stored raw data Important raw payloads: - `raw_payloads.redfish_tree` - `raw_payloads.redfish_fetch_errors` - `raw_payloads.source_timezone` when available ### Snapshot crawler rules - bounded by `LOGPILE_REDFISH_SNAPSHOT_MAX_DOCS` - prioritized toward high-value inventory paths - tolerant of expected vendor-specific failures - normalizes `@odata.id` values before queueing ### Redfish implementation guidance When changing collection logic: 1. Prefer alternate-path support over vendor hardcoding 2. Keep expensive probing bounded 3. Deduplicate by serial, then BDF, then location/model fallbacks 4. Preserve replay determinism from saved raw payloads 5. Add tests for both the motivating topology and a negative case ### Known vendor fallbacks - empty standard drive collections may trigger bounded `Disk.Bay` probing - `Storage.Links.Enclosures[*]` may be followed to recover physical drives - `PowerSubsystem/PowerSupplies` is preferred over legacy `Power` when available ## IPMI collector Status: mock scaffold only. It remains registered for protocol completeness, but it is not a real collection path.