Skip to content
Monitoring

Monitoring

gpsu serves Prometheus metrics and health checks on their own listener.

Metrics listener

GPSU_METRICS_LISTEN or --metrics-listen sets the address. It defaults to :9465.

PathServes
/metricsPrometheus metrics
/healthzThe liveness check
/readyzThe readiness check

/readyz fails while any server has gone three intervals, and at least 30 seconds, without a successful reading.

Metrics

Every metric carries a server label.

MetricLabelsMeaning
gpsu_temperature_celsiusrole, sensor, numberThe temperature a sensor gpsu reads reports
gpsu_fan_rpmfanThe speed a fan sensor reports
gpsu_power_wattsThe system power from the DCMI power reading
gpsu_control_temperature_celsiusThe control temperature. This is the CPU temperature the template picks plus any inlet offset.
gpsu_policy_percentThe fan speed the curve gives, before the hard limits
gpsu_fan_target_percentThe fan speed gpsu sets while it runs fan control
gpsu_modemodeWho controls the fans. The series whose mode matches is 1. manual means gpsu, auto means iDRAC auto, and unknown means gpsu can’t tell.
gpsu_passive1 when the server is in passive mode
gpsu_read_errors_totalReadings that failed because a sensor couldn’t be read
gpsu_send_errors_totalFan commands the iDRAC didn’t accept
gpsu_handoffs_totalreasonHandoffs to the iDRAC. See the reasons below.
gpsu_last_tick_timestamp_secondsWhen gpsu last took a reading
gpsu_last_control_success_timestamp_secondsWhen a reading last succeeded. A reading succeeds when gpsu reads the sensors and sends any fan command that’s due.
gpsu_ipmi_request_duration_secondscommandHow long an IPMI request took, including retries and opening a session
gpsu_ipmi_errors_totalcommand, kindIPMI requests that failed. kind is transport for no response or completion for a failing completion code.

gpsu_handoffs_total counts these reason values:

reasonHandoff because
read_failedThe sensors couldn’t be read
no_cpu_readingNo CPU temperature could be read
no_inlet_readingThe inlet temperature couldn’t be read
control_temperatureThe control temperature passed its limit
inlet_temperatureThe inlet temperature passed its limit
exhaust_temperatureThe exhaust temperature passed its limit
overrideSomeone set a Hand off to iDRAC override

Important

Alert when gpsu_last_control_success_timestamp_seconds stops advancing. One example is time() - gpsu_last_control_success_timestamp_seconds > 60. When gpsu can’t reach the iDRAC, it can’t hand off to the iDRAC either. The fans then keep their last speed.

Logs

Logs are set by environment variables only:

VariableValuesDefault
GPSU_LOG_LEVELtrace, debug, info, warninfo
GPSU_LOG_FORMATtext, jsontext
  • debug adds each reading. It also adds each form the CSRF check refuses for its origin or its Sec-Fetch-Site header.
  • trace also adds each IPMI exchange.
  • Text output is colored on a terminal.

Profiling

Go’s pprof profiler is disabled unless a setting enables it:

GPSU_PPROF_LISTEN=127.0.0.1:6060 GPSU_PPROF_API=true gpsu serve
VariableFlagServes pprof atAccess
GPSU_PPROF_LISTEN--pprof-listen/debug/pprof/ on its own listenerAnyone who can reach the address
GPSU_PPROF_API--pprof-api/api/v1/debug/pprof/Admins only

The metrics port never exposes pprof.

Warning

Anyone who can reach the GPSU_PPROF_LISTEN address can read profiles. On a host, set it to 127.0.0.1:6060. In a container, set it to :6060 and publish it only to the host’s loopback with -p 127.0.0.1:6060:6060.