Go to file
TJ Hoplock 3db8be8c30 ci: enable sloglint in golangci-lint
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2024-10-17 22:28:32 -04:00
.circleci chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
.github Update common Prometheus files 2024-08-06 17:49:21 +00:00
contrib/rpm Refactor rpm build process 2022-12-02 14:19:36 +01:00
docs feat: custom SEL events metrics 2024-01-12 18:17:14 +03:00
freeipmi chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
.gitignore add rpm build via docker 2022-11-24 10:42:43 +01:00
.golangci.yml ci: enable sloglint in golangci-lint 2024-10-17 22:28:32 -04:00
.promu.yml chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
.yamllint Update common Prometheus files 2024-07-09 17:48:35 +00:00
CHANGELOG.md Prepare release of version 1.9.0 2024-10-17 21:37:38 +02:00
CODE_OF_CONDUCT.md Update common Prometheus files 2022-05-08 19:51:15 +00:00
collector_bmc_watchdog.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
collector_bmc.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
collector_chassis.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
collector_dcmi.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
collector_ipmi.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
collector_sel_events.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
collector_sel.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
collector_sm_lan_mode.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
collector.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
config.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
CONTRIBUTING.md Update for Prometheus Community 2021-09-21 13:42:22 +02:00
docker-compose.yml Fix docker-compose command 2023-03-14 11:37:13 +01:00
Dockerfile fix: bring back aarch64 builds 2024-03-13 13:33:05 -04:00
go.mod chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
go.sum chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
ipmi_local.yml feat: custom SEL events metrics 2024-01-12 18:17:14 +03:00
ipmi_remote.yml feat: custom SEL events metrics 2024-01-12 18:17:14 +03:00
LICENSE Update for Prometheus Community 2021-09-21 13:42:22 +02:00
main.go chore!: adopt slog, drop go-kit/log 2024-10-17 20:28:12 -04:00
Makefile fix: bring back aarch64 builds 2024-03-13 13:33:05 -04:00
Makefile.common Update common Prometheus files 2024-07-09 17:48:35 +00:00
NOTICE Update for Prometheus Community 2021-09-21 13:42:22 +02:00
README.md README: link to multi-target pattern guide 2024-10-17 22:10:53 +02:00
SECURITY.md Update common Prometheus files 2022-05-08 19:51:15 +00:00
VERSION Prepare release of version 1.9.0 2024-10-17 21:37:38 +02:00

Prometheus IPMI Exporter

Build Status

This is an IPMI exporter for Prometheus.

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 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 to get the general idea about the configuration.

The exporter relies on tools from the FreeIPMI suite for the actual IPMI implementation.

Installation

For most use-cases, simply download the the latest release.

For Kubernets, you can use the community-maintained Helm chart.

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:

go get github.com/prometheus-community/ipmi_exporter

Building a Docker container

You can build a Docker container with the included docker make target:

make promu
promu crossbuild -p linux/amd64 -p linux/arm64
make docker

This will not even require Go tooling on the host. See the included docker compose example for how to use the resulting container.

Building a RPM Package

See how to build a RPM package.

Running

A minimal invocation looks like this:

./ipmi_exporter

Supported parameters include:

  • web.listen-address: the address/port to listen on (default: ":9290")
  • config.file: path to the configuration file (default: none)
  • freeipmi.path: path to the FreeIPMI executables (default: rely on $PATH)

For syntax and a complete list of available parameters, run:

./ipmi_exporter -h

Make sure you have the following tools from the FreeIPMI suite installed:

  • ipmimonitoring/ipmi-sensors
  • ipmi-dcmi
  • ipmi-raw
  • bmc-info
  • ipmi-sel
  • ipmi-chassis

Running as unprivileged user

If you are running the exporter as unprivileged user, but need to execute the FreeIPMI tools as root, you can do the following:

  1. Add sudoers files to permit the following commands
    ipmi-exporter ALL = NOPASSWD: /usr/sbin/ipmimonitoring,\
                                  /usr/sbin/ipmi-sensors,\
                                  /usr/sbin/ipmi-dcmi,\
                                  /usr/sbin/ipmi-raw,\
                                  /usr/sbin/bmc-info,\
                                  /usr/sbin/ipmi-chassis,\
                                  /usr/sbin/ipmi-sel
    
  2. In your module config, override the collector command with sudo for every collector you are using and add the actual command as custom argument. Example for the "ipmi" collector:
    collector_cmd:
      ipmi: sudo
    custom_args:
      ipmi:
      - "ipmimonitoring"
    
    See the last module in the example config.

Running in Docker

NOTE: you should only use Docker for remote metrics.

See Building a Docker container and the example docker-compose.yml. Edit the ipmi_remote.yml file to configure IPMI credentials, then run with:

sudo docker-compose up -d

By default, the server will bind on 0.0.0.0:9290.

Configuration

The configuration document describes both the configuration of the IPMI exporter itself as well as providing some guidance for configuring the Prometheus server to scrape it.

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 in the exporter-toolkit repository.

Exported data

For a description of the metrics that this exporter provides, see the metrics document.