Supermicro and other boards with IPMI
Servers whose BMC only speaks IPMI
What it is for
Read the BMC of a board that has no Redfish. Measured in our own fleet: two of three controllers only speak IPMI, among them a Supermicro X9DRD-iF/LF that does not answer HTTPS at all.
What goes unnoticed without it
An older board has a perfectly good BMC that nobody logs in to. Its fans, voltages and power state are known to the controller, and to nothing else.
How to set it up
Install ipmitool on the agent’s host
The agent does not install it. Without it, the controller is reported as a blind spot that says so.
sudo apt install ipmitool # or: sudo dnf install ipmitoolCreate a read-only IPMI user
In the BMC’s web interface or with ipmitool, with the User privilege level, and enable IPMI over LAN. Use an account that is not used for anything else.
Put the BMC on a management network
IPMI has no TLS, and its handshake hands out a hash of the password to anyone who can reach it. The protection is where the BMC sits, not cryptography.
Put the account in a file only root can read
Quote the password: the script sources this file, and a space in an unquoted value makes the shell run the rest of the line.
# /etc/ziix-observer/ipmi.env chown root:root, chmod 0600 BMC_HOST=192.0.2.20 BMC_USER=monitor BMC_PASS="the password, in quotes"Add the script
For a board with no HTTPS at all, a small script on the host is the way in today. It only reads, passes the password in IPMI_PASSWORD and never on the command line, and answers like a Nagios plugin: 0 ok, 2 critical, 3 unknown. Tested against ipmitool’s sdr format.
#!/bin/sh # /usr/local/bin/sf-ipmi - reads a BMC over IPMI. Read-only. set -u # BMC_HOST, BMC_USER and BMC_PASS. Owned by root, mode 0600. ENV_FILE=${IPMI_ENV:-/etc/ziix-observer/ipmi.env} [ -r "$ENV_FILE" ] || { echo "cannot read $ENV_FILE"; exit 3; } . "$ENV_FILE" # The password goes in the environment, never on the command line, # where every user on the host could read it in the process table. export IPMI_PASSWORD="$BMC_PASS" ipmi() { ipmitool -I lanplus -H "$BMC_HOST" -U "$BMC_USER" -E "$@" 2>&1; } SDR=$(ipmi sdr) || { echo "IPMI UNKNOWN - $(printf '%s\n' "$SDR" | head -n1)"; exit 3; } POWER=$(ipmi chassis power status | awk '{print $NF}') # ns is "no reading" (an empty fan slot), not a fault. printf '%s\n' "$SDR" | awk -F'|' -v power="${POWER:-unknown}" ' { s = $3; gsub(/ /, "", s); n = $1; gsub(/^ +| +$/, "", n) } s == "ok" { ok++ } s == "ns" { ns++ } s == "nc" || s == "cr" || s == "nr" { bad = bad (bad ? ", " : "") n } END { if (ok + 0 == 0 && bad == "") { print "IPMI UNKNOWN - no sensor answered"; exit 3 } if (bad != "") { printf "IPMI CRITICAL - %s|ok=%d not_present=%d\n", bad, ok, ns; exit 2 } printf "IPMI OK - %d sensors ok, %d not present, power %s|ok=%d not_present=%d\n", ok, ns, power, ok, ns }'Point a reporter at it
In /etc/ziix-observer/agent.yaml. A reporter is picked up on the next collection round, without a restart.
sudo install -m 0755 sf-ipmi /usr/local/bin/sf-ipmi reporter.ipmi.command: /usr/local/bin/sf-ipmi reporter.ipmi.interval: 15m reporter.ipmi.timeout: 30s
How you use it
A result per run
The reporter answers ok, failed or blind, with a sentence: IPMI OK - 31 sensors ok, 3 not present, power on. It shows on the host page and alerts like any reporter.
Numbers become graphs
Counts and readings in the script’s output become measurements with a graph and a threshold of their own.
What it does not do
- A sensor that reads ns has no reading, usually an empty fan slot, and is not a fault. Only nc, cr and nr are.
- IPMI cannot see an array behind a RAID controller, and no sensor says which one is the inlet.
- The native bmc block in agent.yaml tries Redfish first and falls back to ipmitool, but it still asks for a certificate fingerprint, which a board with no HTTPS cannot give. Until that changes, use the reporter.
Related use cases
Start with one host
Free covers a single host and seven days of logs. No card needed.