> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sambanova.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# XRDU exporter

The XRDU exporter publishes fan and temperature metrics from XRDU baseboard management controllers (BMCs). One exporter instance serves any number of XRDUs. Prometheus scrapes `/probe?target=<address>` once per BMC.

| Property | Value |
| :- | :- |
| Port | 9821 by default. Set `xrdu-exporter.port`. |
| Runs as | A Deployment, deployed by the `sambanova-hardware-monitoring` chart |
| Device protocol | The BMC's HTTPS API, port 443, self-signed certificate |
| Authentication | Required. An XRDU BMC has no guest read. |
| Network | The cluster nodes need a route to the XRDU BMCs on the management network |
| Image version | 0.1.1 or later. Version 0.1.0 rejects BMC certificates with a negative serial number. |

## Endpoints

| Endpoint | Returns |
| :- | :- |
| `/probe?target=<address>` | The metrics for one BMC |
| `/metrics` | The exporter's own process metrics. Contains no BMC data. |
| `/healthz` | `ok` while the exporter is running |

`/probe` takes no optional parameters. A healthy BMC publishes about 97 series: 14 fan readings, 81 temperatures, `xrdu_up`, and `xrdu_scrape_duration_seconds`.

## Metrics

| Metric | Type | Labels | Description |
| :- | :- | :- | :- |
| `xrdu_fan_rpm` | gauge | `sensor` | Fan tachometer reading in revolutions per minute |
| `xrdu_temperature_celsius` | gauge | `sensor` | Temperature in degrees Celsius |
| `xrdu_up` | gauge | none | `1` when the BMC answered, `0` when it did not |
| `xrdu_scrape_duration_seconds` | gauge | none | Time taken to read the BMC |

This is the complete supported set.

A sensor the BMC reports as not working, absent, or implausible publishes no sample. No metric marks the missing reading, so the series simply has a gap.

## Labels

| Label | Values | Description |
| :- | :- | :- |
| `xrdu` | The target's `name`, or its address | Identifies the BMC. Added by Prometheus, not the exporter. |
| `sensor` | `fm0_fan0`, `inlet`, `RDU0_D0_CORETEMP` | The BMC's own sensor name, unchanged |
| `rack`, `node`, `xrdu_index` | Whatever you declare | Declared in the target's `labels` |

<Warning>
  The `xrdu` label means different things in different exporters. On `xrdu_*` series it holds a BMC hostname, such as `<rack-id>-h1xr0`. On `sambanova_*` series it holds the host's own index, `XRDU_0` to `XRDU_7`. A join on `xrdu` between the two matches nothing and reports no error.
</Warning>

### Join XRDU thermals with host metrics

To join BMC metrics with `sambanova_*` series, declare the host's XRDU index on each target alongside `node`:

```yaml theme={}
xrdu-exporter:
  targets:
    - address: <xrdu-0-ip>
      name: <xrdu-0-hostname>
      labels:
        node: <node-name>
        xrdu_index: XRDU_0
```

The XRDU number in `snctl rack show` (`Node/<n>/xrdu/<m>`) matches the host's index, `XRDU_<m>`.

Join on both `node` and `xrdu_index`. The index is not unique on its own, because `XRDU_2` exists on every node.

## Behavior

| Behavior | Detail |
| :- | :- |
| An unreachable BMC returns HTTP 200 with `xrdu_up 0` | A rejected credential and an unparseable certificate look identical from the metric alone. The exporter log distinguishes them. Alert on `xrdu_up == 0`. |
| The exporter reports readings, not verdicts | Nothing here tells you a sensor is out of range. |
| Scrape no faster than every 30 seconds | A BMC takes 2.3 to 2.7 seconds to answer. The exporter enforces a minimum scrape timeout of 5 seconds and refuses to start below it. |
| Extra replicas multiply BMC load | Replicas do not share a cache. Keep `replicaCount` at `1`. |

## Data the exporter does not publish

The exporter reads the BMC's OpenBMC sensor tree over HTTPS and maps part of it onto the metrics above. The BMC returns more in the same response. If you need any of the following, it is not available through this exporter.

| Not published | Detail |
| :- | :- |
| Voltage, current, power, and utilization sensors | Returned in the same response as fans and temperatures, but not published. |
| Threshold limits | The BMC declares warning and critical limits, high and low, per sensor. |
| Breach alarms | The BMC sets a flag when a reading enters a warning or critical band, including transiently. |
| Commanded fan duty | The tachometer reading in `xrdu_fan_rpm` is what describes the fan. |
| A sensor's operating range | The BMC reports a minimum and maximum alongside each value. |
| Optical transceiver telemetry | QSFP case and die temperature, connection state, and firmware version. |
| BMC event logs and Redfish telemetry reports | Fault reports are a separate BMC interface. This exporter reads sensors only. |
| Power state and inventory | Chassis power state, serial numbers, and FRU data. Use SambaRack Manager for those. |

To read a sensor straight from the device, bypassing the exporter:

```bash theme={}
read -rs -p "XRDU BMC password: " XRDU_PASSWORD; echo

curl -sk -u root:"$XRDU_PASSWORD" \
  "https://<bmc-address>/xyz/openbmc_project/sensors/enumerate" | jq

unset XRDU_PASSWORD
```

Both `-k` and `-u` are required. The BMC presents a self-signed certificate and requires authentication.

## Configuration

### Helm values

| Key | Default | Description |
| :- | :- | :- |
| `xrdu-exporter.enabled` | `true` | Deploy the exporter |
| `xrdu-exporter.probe.enabled` | `true` | Create the `Probe` that scrapes the BMCs. Without it, nothing scrapes them. |
| `xrdu-exporter.probe.interval` | `30s` | Scrape interval. Do not shorten it. |
| `xrdu-exporter.probe.scrapeTimeout` | `15s` | Prometheus scrape timeout. Must be longer than `xrdu-exporter.scrapeTimeout`. |
| `xrdu-exporter.probe.labels` | `{}` | Must match your Prometheus `probeSelector` |
| `xrdu-exporter.targets` | `[]` | Required when enabled. See [Targets](#targets). |
| `xrdu-exporter.auth.existingSecret` | `""` | Secret with `XRDU_USERNAME` and `XRDU_PASSWORD`. One credential setting is required. |
| `xrdu-exporter.auth.username` / `.password` | `""` | Used only when `auth.existingSecret` is empty. Set `auth.password` (and optionally `auth.username`) and the chart creates `xrdu-exporter-credentials`. The username defaults to `root`. Prefer `auth.existingSecret`: a password set here is stored in the Helm release. |
| `xrdu-exporter.auth.usernameKey` / `.passwordKey` | `XRDU_USERNAME` / `XRDU_PASSWORD` | Key names inside the Secret |
| `xrdu-exporter.cacheTTL` | `15s` | How long one BMC's read is reused |
| `xrdu-exporter.scrapeTimeout` | `10s` | Exporter-side timeout. Minimum `5s`. |
| `xrdu-exporter.logLevel` | `info` | `debug`, `info`, `warn`, or `error` |
| `xrdu-exporter.serviceMonitor.enabled` | `false` | Scrape the exporter's own `/metrics` |
| `xrdu-exporter.serviceMonitor.interval` | `60s` | Applies to the exporter's own endpoint only. `probe.interval` governs how often BMCs are read. |
| `xrdu-exporter.serviceMonitor.scrapeTimeout` | `10s` | Must not exceed the interval |
| `xrdu-exporter.replicaCount` | `1` | Number of exporter pods |
| `xrdu-exporter.port` | `9821` | Port the exporter listens on |
| `xrdu-exporter.resources` | 50m / 64Mi, limit 256Mi | Pod requests and limits |
| `xrdu-exporter.nodeSelector` / `.tolerations` / `.affinity` | `{}` / `[]` / `{}` | Pin the pod to nodes that can reach the management network |
| `xrdu-exporter.podSecurityContext` / `.securityContext` | non-root, read-only rootfs, drop ALL | Hardened by default |

### Targets

```yaml theme={}
xrdu-exporter:
  enabled: true
  probe:
    enabled: true
  auth:
    existingSecret: xrdu-creds
  targets:
    - address: <xrdu-0-ip>
      name: <xrdu-0-hostname>
      labels:
        rack: "<rack-id>"
    - <xrdu-1-ip>                   # no labels: excluded from per-rack panels and host joins
    - address: <xrdu-2-ip>
```

| Field | Description |
| :- | :- |
| `address` | Required. Goes into `?target=` as written. |
| `name` | Replaces the address as the `xrdu` label |
| `labels` | Each key becomes a label on every series from this BMC |

The username defaults to `root`, so you usually set only the password. Get it with `snctl secret get --device-type xrdu --show-value`.

## Next steps

* [Install monitoring](monitoring-install)
* [Reference dashboards](monitoring-reference-dashboards)
* [Troubleshooting](monitoring-troubleshooting#xrdu-probe-failures)
