2017-07-25 14:17:57 +00:00
|
|
|
Prometheus IPMI Exporter
|
|
|
|
========================
|
|
|
|
|
2021-09-21 10:18:34 +00:00
|
|
|
[![Build Status](https://circleci.com/gh/prometheus-community/ipmi_exporter.svg?style=svg)](https://circleci.com/gh/prometheus-community/ipmi_exporter)
|
2019-10-14 13:58:59 +00:00
|
|
|
|
2023-11-15 12:50:43 +00:00
|
|
|
This is an IPMI exporter for [Prometheus][prometheus].
|
|
|
|
|
|
|
|
[prometheus]: https://prometheus.io "Prometheus homepage"
|
2017-07-25 14:17:57 +00:00
|
|
|
|
2018-08-03 14:23:35 +00:00
|
|
|
It supports both the regular `/metrics` endpoint, exposing metrics from the
|
|
|
|
host that the exporter is running on, as well as an `/ipmi` endpoint that
|
2024-10-17 20:10:53 +00:00
|
|
|
supports IPMI over RMCP, implementing the multi-target exporter pattern. If you
|
|
|
|
plan to use the latter, please read the guide [Understanding and using the
|
|
|
|
multi-target exporter pattern][multi-target] to get the general idea about the
|
|
|
|
configuration.
|
|
|
|
|
|
|
|
[multi-target]: https://prometheus.io/docs/guides/multi-target-exporter/
|
2018-08-03 14:23:35 +00:00
|
|
|
|
2023-11-15 12:50:43 +00:00
|
|
|
The exporter relies on tools from the [FreeIPMI][freeipmi] suite for the actual
|
|
|
|
IPMI implementation.
|
|
|
|
|
|
|
|
[freeipmi]: https://www.gnu.org/software/freeipmi/ "FreeIPMI homepage"
|
2017-07-25 14:17:57 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2023-11-15 12:50:43 +00:00
|
|
|
For most use-cases, simply download the [the latest release][releases].
|
|
|
|
|
|
|
|
[releases]: https://github.com/prometheus-community/ipmi_exporter/releases "IPMI exporter releases on Github"
|
|
|
|
|
|
|
|
For Kubernets, you can use the community-maintained [Helm chart][helm].
|
|
|
|
|
|
|
|
[helm]: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-ipmi-exporter "IPMI exporter Helm chart in the helm-charts Github repo"
|
2019-10-18 11:52:05 +00:00
|
|
|
|
2024-10-18 08:03:21 +00:00
|
|
|
Pre-built container images are available on [dockerhub][dockerhub] and
|
|
|
|
[quay.io][quay.io].
|
|
|
|
|
|
|
|
[dockerhub]: https://hub.docker.com/r/prometheuscommunity/ipmi-exporter
|
|
|
|
[quay.io]: https://quay.io/repository/prometheuscommunity/ipmi-exporter
|
|
|
|
|
2019-10-18 11:52:05 +00:00
|
|
|
### Building from source
|
|
|
|
|
|
|
|
You need a Go development environment. Then, simply run `make` to build the
|
|
|
|
executable:
|
|
|
|
|
|
|
|
make
|
|
|
|
|
|
|
|
This uses the common prometheus tooling to build and run some tests.
|
|
|
|
|
|
|
|
Alternatively, you can use the standard Go tooling, which will install the
|
|
|
|
executable in `$GOPATH/bin`:
|
2017-07-25 14:17:57 +00:00
|
|
|
|
2024-10-18 08:03:21 +00:00
|
|
|
go install github.com/prometheus-community/ipmi_exporter@latest
|
2017-07-25 14:17:57 +00:00
|
|
|
|
2024-10-18 08:03:21 +00:00
|
|
|
### Building a container image
|
2019-10-18 11:52:05 +00:00
|
|
|
|
2024-10-18 08:03:21 +00:00
|
|
|
You can build a container image with the included `docker` make target:
|
2019-10-18 11:52:05 +00:00
|
|
|
|
2022-02-21 20:47:02 +00:00
|
|
|
make promu
|
2024-03-13 17:33:05 +00:00
|
|
|
promu crossbuild -p linux/amd64 -p linux/arm64
|
2019-10-18 11:52:05 +00:00
|
|
|
make docker
|
|
|
|
|
2017-07-25 14:17:57 +00:00
|
|
|
## Running
|
|
|
|
|
|
|
|
A minimal invocation looks like this:
|
|
|
|
|
|
|
|
./ipmi_exporter
|
|
|
|
|
|
|
|
Supported parameters include:
|
|
|
|
|
|
|
|
- `web.listen-address`: the address/port to listen on (default: `":9290"`)
|
2018-09-21 19:50:30 +00:00
|
|
|
- `config.file`: path to the configuration file (default: none)
|
2019-02-20 19:11:49 +00:00
|
|
|
- `freeipmi.path`: path to the FreeIPMI executables (default: rely on `$PATH`)
|
|
|
|
|
2018-09-21 19:50:30 +00:00
|
|
|
For syntax and a complete list of available parameters, run:
|
2019-02-20 19:11:49 +00:00
|
|
|
|
|
|
|
./ipmi_exporter -h
|
2017-07-25 14:17:57 +00:00
|
|
|
|
2023-11-15 12:50:43 +00:00
|
|
|
Make sure you have the following tools from the [FreeIPMI][freeipmi] suite
|
|
|
|
installed:
|
2017-07-25 14:17:57 +00:00
|
|
|
|
2018-09-21 19:50:30 +00:00
|
|
|
- `ipmimonitoring`/`ipmi-sensors`
|
2017-07-25 14:17:57 +00:00
|
|
|
- `ipmi-dcmi`
|
2020-07-26 15:16:30 +00:00
|
|
|
- `ipmi-raw`
|
2017-07-25 14:17:57 +00:00
|
|
|
- `bmc-info`
|
2020-04-22 20:21:25 +00:00
|
|
|
- `ipmi-sel`
|
2020-07-26 15:16:30 +00:00
|
|
|
- `ipmi-chassis`
|
2017-07-25 14:17:57 +00:00
|
|
|
|
2024-10-18 08:03:21 +00:00
|
|
|
When running a container image, make sure to:
|
|
|
|
|
|
|
|
- set `config.file` to where the config file is mounted
|
|
|
|
- expose the default port (9290) or set `web.listen-address` accordingly
|
|
|
|
|
|
|
|
**NOTE:** you should only use containers for collecting remote metrics.
|
2019-10-11 19:38:21 +00:00
|
|
|
|
2017-07-25 14:17:57 +00:00
|
|
|
## Configuration
|
|
|
|
|
2021-05-19 21:27:29 +00:00
|
|
|
The [configuration](docs/configuration.md) document describes both the
|
|
|
|
configuration of the IPMI exporter itself as well as providing some guidance
|
|
|
|
for configuring the Prometheus server to scrape it.
|
2017-07-25 14:17:57 +00:00
|
|
|
|
2022-02-22 13:55:27 +00:00
|
|
|
## TLS and basic authentication
|
|
|
|
|
|
|
|
The IPMI Exporter supports TLS and basic authentication.
|
|
|
|
|
|
|
|
To use TLS and/or basic authentication, you need to pass a configuration file
|
|
|
|
using the `--web.config.file` parameter. The format of the file is described
|
2023-11-15 12:50:43 +00:00
|
|
|
[in the exporter-toolkit repository][toolkit].
|
|
|
|
|
|
|
|
[toolkit]: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md
|
2022-02-22 13:55:27 +00:00
|
|
|
|
2017-07-25 14:17:57 +00:00
|
|
|
## Exported data
|
|
|
|
|
2021-05-19 21:27:29 +00:00
|
|
|
For a description of the metrics that this exporter provides, see the
|
|
|
|
[metrics](docs/metrics.md) document.
|
2024-10-18 08:03:21 +00:00
|
|
|
|
|
|
|
## Privileges
|
|
|
|
|
|
|
|
Collecting host-local IPMI metrics requires root privileges. See
|
|
|
|
[privileges](docs/privileges.md) document for how to avoid running the exporter
|
|
|
|
as root.
|