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.
| Path | Serves |
|---|---|
/metrics | Prometheus metrics |
/healthz | The liveness check |
/readyz | The 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.
| Metric | Labels | Meaning |
|---|---|---|
gpsu_temperature_celsius | role, sensor, number | The temperature a sensor gpsu reads reports |
gpsu_fan_rpm | fan | The speed a fan sensor reports |
gpsu_power_watts | The system power from the DCMI power reading | |
gpsu_control_temperature_celsius | The control temperature. This is the CPU temperature the template picks plus any inlet offset. | |
gpsu_policy_percent | The fan speed the curve gives, before the hard limits | |
gpsu_fan_target_percent | The fan speed gpsu sets while it runs fan control | |
gpsu_mode | mode | Who 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_passive | 1 when the server is in passive mode | |
gpsu_read_errors_total | Readings that failed because a sensor couldn’t be read | |
gpsu_send_errors_total | Fan commands the iDRAC didn’t accept | |
gpsu_handoffs_total | reason | Handoffs to the iDRAC. See the reasons below. |
gpsu_last_tick_timestamp_seconds | When gpsu last took a reading | |
gpsu_last_control_success_timestamp_seconds | When a reading last succeeded. A reading succeeds when gpsu reads the sensors and sends any fan command that’s due. | |
gpsu_ipmi_request_duration_seconds | command | How long an IPMI request took, including retries and opening a session |
gpsu_ipmi_errors_total | command, kind | IPMI requests that failed. kind is transport for no response or completion for a failing completion code. |
gpsu_handoffs_total counts these reason values:
reason | Handoff because |
|---|---|
read_failed | The sensors couldn’t be read |
no_cpu_reading | No CPU temperature could be read |
no_inlet_reading | The inlet temperature couldn’t be read |
control_temperature | The control temperature passed its limit |
inlet_temperature | The inlet temperature passed its limit |
exhaust_temperature | The exhaust temperature passed its limit |
override | Someone 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:
| Variable | Values | Default |
|---|---|---|
GPSU_LOG_LEVEL | trace, debug, info, warn | info |
GPSU_LOG_FORMAT | text, json | text |
debugadds each reading. It also adds each form the CSRF check refuses for its origin or itsSec-Fetch-Siteheader.tracealso 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| Variable | Flag | Serves pprof at | Access |
|---|---|---|---|
GPSU_PPROF_LISTEN | --pprof-listen | /debug/pprof/ on its own listener | Anyone 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.