Implement the full architectural plan: unified ingest.Service entry point for archive and Redfish payloads, modular redfishprofile package with composable profiles (generic, ami-family, msi, supermicro, dell, hgx-topology), score-based profile matching with fallback expansion mode, and profile-driven acquisition/analysis plans. Vendor-specific logic moved out of common executors and into profile hooks. GPU chassis lookup strategies and known storage recovery collections (IntelVROC/HA-RAID/MRVL) now live in ResolvedAnalysisPlan, populated by profiles at analysis time. Replay helpers read from the plan; no hardcoded path lists remain in generic code. Also splits redfish_replay.go into domain modules (gpu, storage, inventory, fru, profiles) and adds full fixture/matcher/directive test coverage including Dell, AMI, unknown-vendor fallback, and deterministic ordering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.7 KiB
3.7 KiB
02 — Architecture
Runtime stack
| Layer | Implementation |
|---|---|
| Language | Go 1.22+ |
| HTTP | net/http + http.ServeMux |
| UI | Embedded templates and static assets via go:embed |
| State | In-memory only |
| Build | CGO_ENABLED=0, single binary |
Default port: 8082
Audit result rendering is delegated to embedded reanimator/chart, vendored as git submodule internal/chart.
LOGPile remains responsible for upload, collection, parsing, normalization, and Reanimator export generation.
Code map
cmd/logpile/main.go entrypoint and CLI flags
internal/server/ HTTP handlers, jobs, upload/export flows
internal/ingest/ source-family orchestration for upload and raw replay
internal/collector/ live collection and Redfish replay
internal/analyzer/ shared analysis helpers
internal/parser/ archive extraction and parser dispatch
internal/exporter/ CSV and Reanimator conversion
internal/chart/ vendored `reanimator/chart` viewer submodule
internal/models/ stable data contracts
web/ embedded UI assets
Server state
internal/server.Server stores:
| Field | Purpose |
|---|---|
result |
Current AnalysisResult shown in UI and used by exports |
detectedVendor |
Parser/collector identity for the current dataset |
rawExport |
Reopenable raw-export package associated with current result |
jobManager |
Shared async job state for collect and convert flows |
collectors |
Registered live collectors (redfish, ipmi) |
convertOutput |
Temporary ZIP artifacts for batch convert downloads |
State is replaced only on successful upload or successful live collection. Failed or canceled jobs do not overwrite the previous dataset.
Main flows
Upload
POST /api/uploadreceives multipart fieldarchiveinternal/ingest.Serviceresolves the source family- JSON inputs are checked for raw-export package or
AnalysisResultsnapshot - Non-JSON archives go through the archive parser family
- Archive metadata is normalized onto
AnalysisResult - Result becomes the current in-memory dataset
Live collect
POST /api/collectvalidates request fields- Server creates an async job and returns
202 Accepted - Selected collector gathers raw data
- For Redfish, collector runs minimal discovery, matches Redfish profiles, and builds an acquisition plan
- Collector applies profile tuning hints (for example crawl breadth, prefetch, bounded plan-B passes)
- Collector saves
raw_payloads.redfish_treeplus acquisition diagnostics - Result is normalized, source metadata applied, and state replaced on success
Batch convert
POST /api/convertaccepts multiple files- Each supported file is analyzed independently
- Successful results are converted to Reanimator JSON
- Outputs are packaged into a temporary ZIP artifact
- Client polls job status and downloads the artifact when ready
Redfish design rule
Live Redfish collection and offline Redfish re-analysis must use the same replay path.
The collector first captures raw_payloads.redfish_tree, then the replay logic builds the normalized result.
Redfish is being split into two coordinated phases:
- acquisition: profile-driven snapshot collection strategy
- analysis: replay over the saved snapshot with the same profile framework
PCI IDs lookup
Lookup order:
- Embedded
internal/parser/vendors/pciids/pci.ids ./pci.ids/usr/share/hwdata/pci.ids/usr/share/misc/pci.ids/opt/homebrew/share/pciids/pci.ids- Extra paths from
LOGPILE_PCI_IDS_PATH
Later sources override earlier ones for the same IDs.