Skip to content

feat: add FRU (Field Replaceable Unit) collector#322

Open
Zayden-R wants to merge 1 commit into
prometheus-community:masterfrom
Zayden-R:feat/fru-collector
Open

feat: add FRU (Field Replaceable Unit) collector#322
Zayden-R wants to merge 1 commit into
prometheus-community:masterfrom
Zayden-R:feat/fru-collector

Conversation

@Zayden-R

@Zayden-R Zayden-R commented Apr 3, 2026

Copy link
Copy Markdown

Summary

Adds a new ipmi-fru collector that exposes hardware inventory data as the ipmi_fru_info Prometheus metric.

Closes #127

What this implements

  • New collector_fru.go following the existing collector_bmc.go pattern
  • 6 FRU regex patterns + getter functions in freeipmi/freeipmi.go
  • Registration in config.go via GetInstance() switch
  • Labels: product_name, product_serial, product_manufacturer, product_part_number, board_product_name, chassis_type
  • Graceful degradation: missing fields return N/A, never errors
  • Opt-in via config (not added to default collectors list)

What is NOT included from #127

This is the core implementation. The following items from the original request are left as follow-up work:

  • Per-device FRU entries (PSUs, backplanes, NICs, RAID controllers) -- currently only parses the first/system board entry
  • PSU wattage/capacity parsing (rated watts for capacity alerting)
  • Manufacturing dates
  • DC output specifications
  • Native IPMI implementation (collector_fru_native.go)

These can each be added incrementally in future PRs.

Tested on

  • Hardware: Dell PowerEdge R730
  • OS: RHEL 9.5
  • FreeIPMI: 1.6.14
  • Go: 1.24.2
# HELP ipmi_fru_info Constant metric with value 1 providing FRU information.
# TYPE ipmi_fru_info gauge
ipmi_fru_info{board_product_name="PowerEdge R730",chassis_type="N/A",product_manufacturer="DELL",product_name="PowerEdge R730",product_part_number="",product_serial="H804B42"} 1
ipmi_up{collector="fru"} 1

Example config

modules:
  default:
    collectors:
      - bmc
      - ipmi
      - chassis
      - fru

Signed-off-by: Zayden R Zayden-R@users.noreply.github.com

Adds a new ipmi-fru collector that exposes hardware inventory data as
the ipmi_fru_info Prometheus metric with labels: product_name,
product_serial, product_manufacturer, product_part_number,
board_product_name, and chassis_type.

This is an initial implementation covering the core FRU fields from the
System Board entry. It does not yet include per-device FRU entries
(PSUs, backplanes, NICs), PSU wattage parsing, or manufacturing dates
as discussed in prometheus-community#127 -- those can be added as follow-up work.

Changes:
- collector_fru.go: New FRU collector following existing BMC pattern
- freeipmi/freeipmi.go: 6 FRU regex patterns + getter functions
- config.go: Register FRUCollectorName in GetInstance()

Tested on Dell PowerEdge R730, RHEL 9.5, FreeIPMI 1.6.14.

Closes prometheus-community#127

Signed-off-by: Zayden R <Zayden-R@users.noreply.github.com>
@Zayden-R Zayden-R force-pushed the feat/fru-collector branch from 7b319fb to 793517d Compare April 3, 2026 09:02

@bitfehler bitfehler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

thanks, this looks good. Could I ask you to add a very brief section about this to docs/metrics.md and also add this to the # Available collectors are ... comment in both ipmi_local.yml and ipmi_remote.yml so that people will know/learn about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for ipmi-fru module?

2 participants