Sign inSign up

antilax3/ipmi-exporter

By antilax3

•Updated 8 days ago

IPMI stat exporter for Prometheus

Image
0

10K+

antilax3/ipmi-exporter repository overview

Build⁠ Docker Size⁠ Docker Pulls⁠

⁠AntilaX-3/ipmi-exporter

ipmi-exporter⁠ is a simple server that periodically scrapes IPMI stats and exports them via HTTP for Prometheus consumption, written in Go.

⁠Usage

docker create --name=ipmiexporter \
--device=/dev/ipmi0:/dev/ipmi0 \
-p 9290:9290 \
antilax3/ipmi-exporter

⁠Tags

Two variants are built from the one Dockerfile, for linux/amd64 and linux/arm64.

VariantBaseTags
wolfiantilax3/wolfi⁠latest, 1, 1.10, 1.10.0
alpineantilax3/alpine⁠alpine, 1-alpine, 1.10-alpine, 1.10.0-alpine

Wolfi is the default. Both variants compile the same FreeIPMI release from source and ship the same ipmi_exporter binary. The alpine variant links FreeIPMI against argp-standalone, because musl has no argp and glibc does.

⁠Parameters

The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. For example with a volume -v external:internal - what this shows is the volume mapping from internal to external of the container. So -v /mnt/app/config:/config would map /config from inside the container to be accessible from /mnt/app/config on the host's filesystem.

  • -p 9290 - HTTP port for webserver
  • -e PUID - for UserID, see below for explanation
  • -e PGID - for GroupID, see below for explanation
  • -e TZ - for setting timezone information, eg Australia/Melbourne

It is based on wolfi, or alpine linux for the alpine tags, with s6 overlay, for shell access whilst the container is running do docker exec -it ipmiexporter /bin/bash.

⁠User / Group Identifiers

Sometimes when using data volumes (-v flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work".

In this instance PUID=1001 and PGID=1001. To find yours use id user as below: $ id <dockeruser> uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)

⁠Configuration

To ensure that ipmi-exporter can retrieve and expose metrics you need to mount your IPMI device in the container, per the usage example above or for docker-compose example below:

  ipmiexporter:
    image: ipmi-exporter
    container_name: ipmiexporter
    devices:
      - /dev/ipmi0:/dev/ipmi0
    restart: unless-stopped
    ports:
      - 9290:9290

⁠Development

Linting runs locally through lefthook⁠. Install the hooks once per clone:

lefthook install

pre-commit runs editorconfig-checker⁠, hadolint⁠, jq, shellcheck⁠, typos⁠ and yamllint⁠ over the staged files, and commit-msg enforces Conventional Commits⁠. Run everything on demand with:

lefthook run pre-commit --all-files
⁠Bumping ipmi_exporter and FreeIPMI

IPMIEXPORTER_VERSION and FREEIPMI_VERSION are managed by renovate. ipmi_exporter resolves through its GitHub releases, and FreeIPMI through the release listing on ftp.gnu.org⁠, which is also where the Dockerfile downloads it from. The image tags follow the ipmi_exporter release.

⁠Version

  • 25/09/26: Build on wolfi by default and publish alpine under its own tags, for amd64 and arm64
  • 04/07/25: Updated to use alpine 3.22 image and s6 v3 service structure
  • 05/07/21: Swap to soundcloud/ipmi_exporter and FreeIPMI
  • 19/02/21: Set GO111MODULE to prevent go.mod compilation issues
  • 17/04/19: Initial Release

Tag summary

Content type

Image

Digest

sha256:5f610edd1…

Size

36 MB

Last updated

8 days ago

docker pull antilax3/ipmi-exporter