Sherlock is a Prometheus exporter that collects metrics from Redfish-enabled BMCs, focusing on system, temperature, voltage, power, and fan metrics.
- Collects comprehensive metrics from Redfish-enabled servers
- Supports monitoring multiple servers with a single exporter instance
- Parallel collection of metrics for improved performance
- Detailed health status for most server components
go build -o sherlock ./cmd/sherlockdocker build -t sherlock .export REDFISH_USERNAME="admin"
export REDFISH_PASSWORD="password"
./sherlock# Set your BMC credentials in environment
export REDFISH_USERNAME="admin"
export REDFISH_PASSWORD="password"
# Run with docker-compose
docker-compose up -dThe following environment variables are available:
REDFISH_USERNAME: BMC username (default: "admin")REDFISH_PASSWORD: BMC password (default: "password")REDFISH_INSECURE: Allow insecure HTTPS connections (default: true)LISTEN_ADDRESS: Address to listen on (default: ":9290")METRICS_PATH: Path to expose metrics on (default: "/metrics")
Sherlock requires a target parameter to specify which server to monitor. The target parameter should be just the hostname of the Redfish endpoint (HTTPS is used automatically):
http://sherlock:9290/metrics?target=bmc1.example.com
http://sherlock:9290/metrics?target=bmc2.example.com
If no target is specified, the metrics endpoint will return an error.
In your Prometheus configuration, you can use this feature with relabeling:
scrape_configs:
- job_name: "redfish"
scrape_interval: "60s"
metrics_path: "/metrics"
params:
target: ["bmc1.example.com", "bmc2.example.com"]
static_configs:
- targets: ["sherlock:9290"]
relabel_configs:
- source_labels: [__param_target]
target_label: "instance"This allows you to use a single Sherlock instance to monitor multiple servers while keeping the same credentials.
The exporter provides the following metrics:
ipmi_system_power_state: System power state (1 = On, 0 = Off)ipmi_cpu_health: CPU health status with model and core count as labelsipmi_memory_health: Overall memory subsystem health status with total memory size
ipmi_temperature_celsius: Temperature readings in Celsius with type labelsipmi_temperature_health: Health status of temperature sensors
ipmi_voltage_volts: Voltage readings in Voltsipmi_voltage_health: Health status of voltage sensors
ipmi_psu_health: Power supply health statusipmi_psu_input_power_watts: Power supply AC input power in Wattsipmi_psu_output_power_watts: Power supply DC output power in Watts
ipmi_fan_health: Fan health statusipmi_fan_state: Fan state (1 = On, 0 = Off)ipmi_fan_speed_rpm: Fan speed in RPM