Skip to main content
December 5, 2026

Hear the Failure First: Datacenter Sound Monitoring

Hear the Failure First: Datacenter Sound Monitoring

Can you monitor a datacenter by sound? Yes, and it costs very little. Put a MEMS microphone on an ESP32 in each rack, export the RMS and peak level to Prometheus, add FFT band energy where a fan, an AC compressor or a UPS transformer has a known tone, and compare every rack with its own baseline. Alert on two things: a sudden level jump and a slow drift in one band. Keep language models away from the raw audio. Their job starts after the alert fires.

Anyone who has walked a hall knows the trigger for this idea: a fan blade starts clipping a loose cable, and the rack sounds wrong long before any temperature or RPM sensor moves. A person hears it only if a person is there. A $7 microphone is always there.

What Datacenter Sound Tells You

Rotating and magnetic equipment makes tones at predictable frequencies, so you know where to look in the spectrum:

  • Fans make a tone at the blade pass frequency: blades × RPM / 60. The Engineering Toolbox works the example of a 10-blade fan at 2400 rpm, which gives 400 Hz.
  • Transformers in UPS and PDU gear hum at twice the mains frequency because of magnetostriction in the core: ABB Review gives 100 Hz for 50 Hz units and 120 Hz for 60 Hz units. HyperPhysics explains the doubling: the core reaches its maximum length change twice per cycle.
  • Compressors can be diagnosed from sound too. An IEEE study of a reciprocating air compressor told one healthy and seven faulty states apart from acoustic recordings taken at a single position.

Step 1: Pick a Sensor That Publishes Data

A handheld decibel meter is the wrong tool for monitoring. Retail listings for the TOPTES TS-501B, a common cheap meter, describe a 30 to 130 dB range with A and C weighting, a backlit LCD, max/min and data hold, and three AAA batteries. None of them mention a USB, Bluetooth or other data output. Keep one in the toolbox to spot-check a noisy rack, not to feed a time series.

For the time series, use a digital I2S MEMS microphone. Adafruit's SPH0645LM4H breakout costs $6.95, covers "about 50Hz - 15KHz", has no analog output and runs at 1.6 to 3.6 V. Wire it to an ESP32, which is the only chip family ESPHome's I2S microphone platform supports.

One microphone per rack catches local events such as a fan strike. One per cooling unit and one near the UPS covers the room-level equipment.

Step 2: Export RMS and Peak Level with ESPHome

ESPHome (the docs are at 2026.11.2 at the time of writing) has a sound_level sensor that reports "a microphone's average and peak sound pressure levels over a specified measurement duration", and a prometheus component that serves them at /metrics. A minimal rack node:

i2s_audio:
  i2s_lrclk_pin: GPIO25
  i2s_bclk_pin: GPIO26

microphone:
  - platform: i2s_audio
    adc_type: external
    i2s_din_pin: GPIO33
    channel: left          # default is right; match the mic's select pin
    sample_rate: 16000

sensor:
  - platform: sound_level
    passive: false         # start the mic at boot and measure continuously
    measurement_duration: 1000ms
    rms:
      name: "Rack RMS"
    peak:
      name: "Rack Peak"

web_server:
prometheus:

With passive: false, the docs say the component "will automatically start the microphone when the component sets up". measurement_duration accepts 50 ms to 60 s.

Two things to know about the numbers. First, they are "relative dB, where 0 dB represents the loudest sound the microphone can measure", so a quiet rack shows something like -50, not 55 dBA. That is fine: you alert on change against a baseline, not on an absolute level. Second, each sensor appears as esphome_sensor_value with node and name labels. Point a scrape job at every node and you have one series per rack.

Step 3: Add FFT Band Energy for Fans, Compressors and UPS

ESPHome has no FFT or spectrum component. For band energy, run a small exporter on a Raspberry Pi or mini PC with a USB microphone near the cooling units and the UPS. It uses python-sounddevice, NumPy and the Prometheus Python client:

import numpy as np
import sounddevice as sd
from prometheus_client import Gauge, start_http_server

FS = 48000
N = FS  # one-second window
BANDS = {
    "transformer_2x_mains": (95, 105),   # use 115-125 on a 60 Hz grid
    "fan_bpf": (650, 750),               # 7 blades x 6000 rpm / 60 = 700 Hz
    "high": (4000, 12000),
}
band_db = Gauge("acoustic_band_energy_db", "Band energy, uncalibrated dB", ["band"])
rms_db = Gauge("acoustic_rms_db", "RMS level, dB relative to full scale")

freqs = np.fft.rfftfreq(N, d=1 / FS)
window = np.hanning(N)
start_http_server(9105)

while True:
    x = sd.rec(N, samplerate=FS, channels=1)
    sd.wait()
    x = x[:, 0]
    rms_db.set(20 * np.log10(np.sqrt(np.mean(x**2)) + 1e-12))
    power = np.abs(np.fft.rfft(x * window)) ** 2
    for name, (lo, hi) in BANDS.items():
        e = power[(freqs >= lo) & (freqs < hi)].sum()
        band_db.labels(name).set(10 * np.log10(e + 1e-20))

Compute fan_bpf from the real blade count and the RPM your BMC reports, not from the example. Run python3 -m sounddevice first to list the input devices and pick the right one.

Step 4: Baselines and Alerts in Prometheus

Every rack sounds different, so a global threshold either never fires or always fires. Compare each series with its own past. These rules use only avg_over_time and offset and standard alerting rule syntax. The thresholds are starting points to tune, not standards:

groups:
- name: acoustic
  rules:
  - alert: RackSoundLevelJump
    expr: |
      avg_over_time(esphome_sensor_value{name="Rack RMS"}[2m])
        - avg_over_time(esphome_sensor_value{name="Rack RMS"}[1h] offset 10m) > 6
    for: 3m
    labels:
      severity: warning
    annotations:
      summary: "Rack {{ $labels.node }} is {{ $value | printf \"%.1f\" }} dB louder than its last hour"

  - alert: RackImpulsiveNoise
    expr: |
      (avg_over_time(esphome_sensor_value{name="Rack Peak"}[5m])
        - on(node) avg_over_time(esphome_sensor_value{name="Rack RMS"}[5m]))
      - (avg_over_time(esphome_sensor_value{name="Rack Peak"}[1d] offset 1h)
        - on(node) avg_over_time(esphome_sensor_value{name="Rack RMS"}[1d] offset 1h)) > 6
    for: 10m
    labels:
      severity: warning

  - alert: AcousticBandDrift
    expr: |
      avg_over_time(acoustic_band_energy_db[6h])
        - avg_over_time(acoustic_band_energy_db[6h] offset 1w) > 3
    for: 1h
    labels:
      severity: ticket

Because the values are already in dB, a difference is a ratio: > 6 means about four times the power of the baseline. The offset 1w comparison absorbs a weekly load pattern, if your racks have one.

Which Method Catches Which Failure

Failure What changes in the sound Rule that catches it Time scale
Fan blade hitting a cable Clicks once per revolution, peak rises much more than RMS RackImpulsiveNoise (peak minus RMS) Minutes
Fan stops or races RMS steps down or up, fan_bpf band moves RackSoundLevelJump, check BMC RPM Seconds to minutes
AC compressor wearing out Its bands creep up over days AcousticBandDrift against last week Days to weeks
UPS transformer stress 2x mains band and its harmonics rise AcousticBandDrift on transformer_2x_mains Hours to days
Door open, cleaning, CRAC start Whole room changes at once None: group by room and inhibit Minutes

A plain RMS threshold catches only the second row. The fan strike adds sharp, short events, so the peak-to-RMS gap is a better signal than the level alone. The compressor change is too slow for any "last hour" rule; only a long baseline sees it.

Where an LLM Belongs: Triage, Not the Raw Signal

Research on machine sound uses small, specialised models, not language models. The DCASE 2020 anomalous sound task trains on normal sounds only, because "actual anomalous sounds rarely occur and are highly diverse", and says the task "cannot be solved as a simple classification problem". Its baseline is "a simple autoencoder" on 128 log-mel bands. The MIMII dataset behind it includes fans with faults such as unbalance, voltage change and clogging, with the same kind of baseline. Start with the statistical rules above. Train an autoencoder only if they miss real failures.

The model earns its place after the alert. A sound alert alone says "rack B14 got louder". Someone still has to check the BMC fan RPM and inlet temperature for that rack, look for a ticket about cable work in that row yesterday, and see whether the cooling unit next to it alerted too. That is correlation work, and it is where an agent helps.

Akmatori receives the alert through the Alertmanager webhook, attaches it to an open incident or opens a new one, and its agent can query Prometheus through the Grafana connector and read Jira tickets through the connectors you configure. It is the same pattern as AI root cause analysis for Grafana alerts: statistics detect, the agent explains.

Troubleshooting

The ESP32 reboots or crashes. The sound_level docs warn that "crashes are likely to occur if you include too many additional components", and Bluetooth components are known to conflict with audio. Remove BLE and anything you do not need.

RMS is flat near the floor. The microphone is on the other I2S channel. channel defaults to right; set it to match how the mic's select pin is wired.

The readings are negative. Expected. ESPHome reports dB relative to the microphone's maximum.

Every rack in a room alerts at once. That is a room event, not 40 failing fans. Add a room or row label and use Alertmanager grouping, or an inhibit rule keyed on the cooling unit alert.

The weekly drift rule fires after a hardware change. A new server changes the rack's sound. Silence the rule for that rack for a week until the offset 1w baseline catches up.

sd.rec fails with a sample rate error. The USB microphone probably does not support 48 kHz. Check python3 -m sounddevice and set FS to a supported rate, such as 44100.

Conclusion

Sound is one more metric stream, and a cheap one. RMS and peak from ESPHome catch sudden changes per rack; FFT bands on a small exporter catch slow drift in fans, compressors and transformers; per-rack baselines in Prometheus keep the noise floor honest. Use temperature data too, as in our guide to checking server temperature, and let people or agents do the correlation after the alert.

If your team wants AI-assisted incident workflows on your own infrastructure, Akmatori helps SRE teams investigate alerts, coordinate response, and correlate hardware signals with the tickets behind them. Powered by Gcore for global infrastructure reliability.

Automate incident response and prevent on-call burnout with AI-driven agents!