How pkutz-armada/idrac_exporter works
iDRAC Exporter is a Prometheus exporter for Redfish-managed hardware. Prometheus scrapes /metrics?target=…; the HTTP handler obtains a per-target collector, which discovers Redfish resources, gathers configured metric families, and returns the exposition text. Configuration also supports credential selection, discovery, and reload; documented metric domains include system, sensors, power, processors, events, storage, memory, and networking. The graph follows sampled handler, collector, and Redfish calls; domain coverage also reflects README capabilities, not inspection of every refresh implementation.
Main entry points: client.go Resource collection · handler.go HTTP endpoints · config.go Config loading · collector.go Collector orchestration
Components 21
HTTP serving
- HTTP endpoints
cmd/idrac_exporter/handler.go - Server startup
cmd/idrac_exporter/main.go - Target discovery
internal/config/discover.go
Configuration
- Config loading
cmd/idrac_exporter/config.go - Config and credentials
internal/config/config.go - Environment overrides
internal/config/env.go
Metric collection
- Collector orchestration
internal/collector/collector.go - Resource collection
internal/collector/client.go - Metric definitions
internal/collector/metrics.go - System metrics
internal/collector/client.go - Sensor metrics
internal/collector/client.go - Power metrics
internal/collector/client.go - Processor metrics
internal/collector/client.go - Event log metrics
internal/collector/client.go - Storage metrics
internal/collector/client.go - Memory metrics
internal/collector/client.go - Network metrics
internal/collector/client.go
Redfish access
- Redfish data models
internal/collector/model.go - Redfish transport
internal/collector/redfish.go
Other components
- Prometheus scraper
- Redfish device
Connections 20
- Prometheus scraper → HTTP endpoints: scrapes
README.md - Server startup → HTTP endpoints: registers routes
cmd/idrac_exporter/main.go - HTTP endpoints → Collector orchestration: gets collector
cmd/idrac_exporter/handler.go - HTTP endpoints → Target discovery: serves discovery
cmd/idrac_exporter/handler.go - Server startup → Config loading: loads config
cmd/idrac_exporter/main.go - Config loading → Config and credentials: parses and validates
cmd/idrac_exporter/config.go - Config loading → Environment overrides: applies overrides
cmd/idrac_exporter/config.go - Collector orchestration → Resource collection: dispatches refreshes
internal/collector/collector.go - Resource collection → Redfish transport: requests resources
internal/collector/client.go - Redfish transport → Redfish device: queries Redfish API
internal/collector/redfish.go - Resource collection → Redfish data models: decodes responses
internal/collector/client.go - Collector orchestration → Metric definitions: defines metrics
- Resource collection → System metrics: collects
internal/collector/client.go - Resource collection → Sensor metrics: collects
internal/collector/client.go - Resource collection → Power metrics: collects
internal/collector/client.go - Resource collection → Processor metrics: collects
internal/collector/client.go - Resource collection → Event log metrics: collects
internal/collector/client.go - Resource collection → Storage metrics: collects
internal/collector/client.go - Resource collection → Memory metrics: collects
internal/collector/client.go - Resource collection → Network metrics: collects
internal/collector/client.go