Skip to content

Conversation

@parsa97
Copy link

@parsa97 parsa97 commented Nov 9, 2025

PR Description

This PR adds a new prometheus.exporter.ipmi component to Grafana Alloy for collecting hardware metrics from IPMI-enabled devices.

Key Features:

  • Local IPMI Collection: Monitor the local machine's IPMI interface using FreeIPMI tools
  • Remote IPMI Monitoring: Monitor network-accessible IPMI devices with authentication support
  • Multiple Target Support: Configure multiple remote targets with individual credentials
  • Authentication Options: Supports user/password authentication with configurable driver (LAN_2_0/LAN) and privilege levels (user/admin)
  • Configurable Timeout: Adjustable timeout for IPMI sensor collection (default: 30 seconds)
  • Module Configuration: Support for custom collector modules via inline config or external file

Implementation Details:

  • Component: internal/component/prometheus/exporter/ipmi/
  • Integration: internal/static/integrations/ipmi_exporter/
  • Dependencies: Uses github.com/bougou/go-ipmi for IPMI operations

Which issue(s) this PR fixes

Fixes #731

Notes to the Reviewer


PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@parsa97 parsa97 requested review from a team and clayton-cornell as code owners November 9, 2025 19:16
@CLAassistant
Copy link

CLAassistant commented Nov 9, 2025

CLA assistant check
All committers have signed the CLA.

Comment on lines +3 to +5
aliases:
- ../prometheus.exporter.ipmi/ # /docs/alloy/latest/reference/components/prometheus.exporter.ipmi/
description: Learn about prometheus.exporter.ipmi
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
aliases:
- ../prometheus.exporter.ipmi/ # /docs/alloy/latest/reference/components/prometheus.exporter.ipmi/
description: Learn about prometheus.exporter.ipmi
description: Learn about prometheus.exporter.ipmi

We can drop this alias. The topic is new. Aliases are required if we change the filename or move the fire to a different location.

Comment on lines +8 to +10
products:
- oss
title: prometheus.exporter.ipmi
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
products:
- oss
title: prometheus.exporter.ipmi
products:
- oss
tags:
- text: Community
tooltip: This component is developed, maintained, and supported by the Alloy user community.
title: prometheus.exporter.ipmi

We should add the community badge since this appears to be a community contribution to Alloy.

Comment on lines +13 to +15
# `prometheus.exporter.ipmi`

The `prometheus.exporter.ipmi` component collects hardware metrics from IPMI-enabled devices.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# `prometheus.exporter.ipmi`
The `prometheus.exporter.ipmi` component collects hardware metrics from IPMI-enabled devices.
# `prometheus.exporter.ipmi`
{{< docs/shared lookup="stability/community.md" source="alloy" version="<ALLOY_VERSION>" >}}
The `prometheus.exporter.ipmi` component collects hardware metrics from IPMI-enabled devices.

| `config_file` | `string` | Path to IPMI exporter configuration file. | | no |
| `ipmi_config` | `string` | IPMI exporter configuration as inline YAML string. | | no |

The `timeout` should be set high enough to allow IPMI sensor collection to complete.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The `timeout` should be set high enough to allow IPMI sensor collection to complete.
Set the `timeout` high enough to allow IPMI sensor collection to complete.

A timeout of 30 seconds or more is recommended for most hardware.

The `config_file` and `ipmi_config` arguments are mutually exclusive.
They allow advanced configuration of IPMI collection modules and command overrides.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
They allow advanced configuration of IPMI collection modules and command overrides.
These arguments enable advanced configuration of IPMI collection modules and command overrides.

Comment on lines +338 to +339
Example with environment variables:
```alloy
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Example with environment variables:
```alloy
Example with environment variables:
```alloy

- **Use dedicated monitoring users** with minimal required privileges
- **Store passwords securely** using `env()` or secrets management
- **Never commit passwords** to version control
- **Consider network isolation** for IPMI interfaces (dedicated management network)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **Consider network isolation** for IPMI interfaces (dedicated management network)
- **Consider network isolation** for IPMI interfaces on dedicated management networks


### Local IPMI requirements

For local IPMI collection, ensure:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For local IPMI collection, ensure:
For local IPMI collection, ensure the following minimum requirements are met:

Comment on lines +308 to +326
1. **Hardware support**: Server has BMC/IPMI hardware
2. **Kernel modules** (Linux):
```bash
modprobe ipmi_devintf
modprobe ipmi_si
```
3. **Device permissions**:
```bash
ls -l /dev/ipmi* /dev/ipmi0
# Should be accessible by the user running Alloy
```
4. **FreeIPMI tools** (optional but recommended):
```bash
# Debian/Ubuntu
apt-get install freeipmi-tools

# RHEL/CentOS
yum install freeipmi
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. **Hardware support**: Server has BMC/IPMI hardware
2. **Kernel modules** (Linux):
```bash
modprobe ipmi_devintf
modprobe ipmi_si
```
3. **Device permissions**:
```bash
ls -l /dev/ipmi* /dev/ipmi0
# Should be accessible by the user running Alloy
```
4. **FreeIPMI tools** (optional but recommended):
```bash
# Debian/Ubuntu
apt-get install freeipmi-tools
# RHEL/CentOS
yum install freeipmi
```
- **Hardware support**: Server has BMC/IPMI hardware
- **Kernel modules**: `ipmi_devintf` and `ipmi_si`
- **Device permissions**: `/dev/ipmi0` is accessible by the user running {{< param "PRODUCT_NAME" >}}.
- **FreeIPMI tools**: Optional but recommended.

Removed Linux from second point. Simplified the steps to bullet points and a list of things vs giving Linux commands to load kernel modules etc. We should only provide the OS-specific steps when they directly relate to Alloy, or if they are specific/custom in some way that is outside the typical use, or if we are building a tutorial.

Question: What about MacOS and Windows? Are there pre-reqs for other OSes? or is this a Linux-only thing?

# `prometheus.exporter.ipmi`

The `prometheus.exporter.ipmi` component collects hardware metrics from IPMI-enabled devices.
It supports both local IPMI collection (from the machine running Alloy) and remote IPMI collection from network-accessible devices.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
It supports both local IPMI collection (from the machine running Alloy) and remote IPMI collection from network-accessible devices.
It supports both local IPMI collection from the machine running {{< param "PRODUCT_NAME" >}}, and remote IPMI collection from network-accessible devices.

@fridgepoet fridgepoet removed the request for review from a team November 21, 2025 09:31
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.

Add ipmi_exporter to the prometheus exporters

3 participants