2.8 KiB
2.8 KiB
05 — Collectors
Collectors live in internal/collector/.
Core files:
registry.gofor protocol registrationredfish.gofor live collectionredfish_replay.gofor replay from raw payloadsipmi_mock.gofor the placeholder IPMI implementationtypes.gofor request/progress contracts
Redfish collector
Status: active production path.
Request fields passed from the server:
hostportusernameauth_type- credential field (
passwordor token) tls_mode- optional
power_on_if_host_off
Core rule
Live collection and replay must stay behaviorally aligned. If the collector adds a fallback, probe, or normalization rule, replay must mirror it.
Preflight and host power
Probe()may be used before collection to verify API connectivity and current hostPowerState- if the host is off and the user chose power-on, the collector may issue
ComputerSystem.ResetwithResetType=On - power-on attempts are bounded and logged
- after a successful power-on, the collector waits an extra stabilization window, then checks
PowerStateagain and only starts collection if the host is still on - if the collector powered on the host itself for collection, it must attempt to power it back off after collection completes
- if the host was already on before collection, the collector must not power it off afterward
- if power-on fails, collection still continues against the powered-off host
- all power-control decisions and attempts must be visible in the collection log so they are preserved in raw-export bundles
Discovery model
The collector does not rely on one fixed vendor tree. It discovers and follows Redfish resources dynamically from root collections such as:
SystemsChassisManagers
Stored raw data
Important raw payloads:
raw_payloads.redfish_treeraw_payloads.redfish_fetch_errorsraw_payloads.source_timezonewhen 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.idvalues before queueing
Redfish implementation guidance
When changing collection logic:
- Prefer alternate-path support over vendor hardcoding
- Keep expensive probing bounded
- Deduplicate by serial, then BDF, then location/model fallbacks
- Preserve replay determinism from saved raw payloads
- Add tests for both the motivating topology and a negative case
Known vendor fallbacks
- empty standard drive collections may trigger bounded
Disk.Bayprobing Storage.Links.Enclosures[*]may be followed to recover physical drivesPowerSubsystem/PowerSuppliesis preferred over legacyPowerwhen available
IPMI collector
Status: mock scaffold only.
It remains registered for protocol completeness, but it is not a real collection path.