RBLN Metrics Exporter¶
The RBLN SDK provides a Metrics Exporter that exposes detailed metrics related to Rebellions' NPU devices in Prometheus format. These metrics are designed to be easily scraped by Prometheus and visualized with Grafana, helping you comprehensively monitor your Rebellions NPU device.
Deployment¶
Step 1: Prepare NPU Nodes¶
Follow the same steps as outlined in the device plugin documentation to prepare Kubernetes nodes equipped with RBLN NPUs and ensure the RBLN Driver is installed.
Step 2: Deploy Prometheus¶
Install Prometheus in your Kubernetes cluster using either Helm or the Prometheus Operator.
Note that deploying the RBLN Metrics Exporter does not require Prometheus to be set up beforehand.
Step 3: Deploy RBLN Metrics Exporter¶
Deploy the RBLN Metrics Exporter as a DaemonSet pod on each node with the following command:
The provided manifest includes affinity rules to ensure the Metrics Exporter is deployed only on nodes equipped with RBLN NPUs. Specifically, it uses nodeAffinity to target nodes where the rebellions.ai/npu.present label is set to "true", which is typically set by rbln-npu-feature-discovery.
Kubernetes Mode¶
The exporter supports a Kubernetes mode switch to disable pod-resource lookups and label dependencies for non-Kubernetes environments.
- Manifest env: set
RBLN_METRICS_EXPORTER_KUBERNETES_MODE=off - Binary flag: run
./rbln-metrics-exporter --kubernetes-mode=off
Prometheus-convention Metric Names¶
The exporter emits metric names that follow standard Prometheus naming conventions (rbln_npu_temperature, rbln_npu_power, etc.). This change applies starting with Metrics Exporter v0.2.4; environments installed with an earlier version must migrate their dashboards and alerts to the new names. The legacy RBLN_DEVICE_STATUS:* names are deprecated and will be removed in a future release.
The NPU Operator (chart 0.4.3 and later) deploys the exporter with PROMETHEUS_METRIC_NAMES=true by default, so dashboards and alerts query the rbln_npu_* names listed in Metrics Information.
Migration from legacy metric names
Existing dashboards and alerts that match RBLN_DEVICE_STATUS:* must be updated to the rbln_npu_* names before upgrading the operator chart to 0.4.3. To keep the legacy names during the transition, set PROMETHEUS_METRIC_NAMES=false on the exporter pod through metricsExporter.env in your Helm values. Complete the migration before the release that removes the legacy names.
Step 4: (Optional) Configure Prometheus to Scrape Metrics¶
To allow Prometheus to automatically discover and scrape metrics from the RBLN Metrics Exporter, you can create a ServiceMonitor resource. This is especially useful if you're using the Prometheus Operator. Here's an example ServiceMonitor configuration:
selector labels in the ServiceMonitor match the labels on your RBLN Metrics Exporter Pods, and the release label (if used) matches your Prometheus deployment. You can apply this ServiceMonitor with kubectl apply -f servicemonitor.yaml.
Step 5: (Optional) Deploy Grafana¶
If you wish to visualize the Prometheus metrics through Grafana dashboards, deploy Grafana in your Kubernetes cluster using either Helm or the Grafana Operator.
Metrics Information¶
The following metrics are exported for each NPU device, tagged with the device UUID, card name, and character device node (rblnN).
| Name | Legacy alias (deprecated) | Description | Unit | Minimum version |
|---|---|---|---|---|
rbln_npu_temperature |
RBLN_DEVICE_STATUS:TEMPERATURE |
Temperature | °C | v0.2.0 |
rbln_npu_power |
RBLN_DEVICE_STATUS:CARD_POWER |
Power usage | W | v0.2.0 |
rbln_npu_memory_used |
RBLN_DEVICE_STATUS:DRAM_USED |
DRAM in use | Bytes | v0.2.0 |
rbln_npu_memory_total |
RBLN_DEVICE_STATUS:DRAM_TOTAL |
Total DRAM | Bytes | v0.2.0 |
rbln_npu_utilization |
RBLN_DEVICE_STATUS:UTILIZATION |
Utilization | % | v0.2.0 |
rbln_npu_health |
RBLN_DEVICE_STATUS:HEALTH |
NPU health status | 0/1 | v0.2.0 |
rbln_npu_device_status |
N/A | Device state machine status (one series per state label; only the current state is 1) |
0/1 | v0.3.0 |
rbln_npu_power_state |
N/A | DVFS performance state | Level | v0.3.0 |
rbln_npu_clock_frequency_mhz |
N/A | Clock frequency of the block indicated by the clock label |
MHz | v0.3.0 |
rbln_npu_pcie_link_speed_gts |
N/A | Current PCIe link speed | GT/s | v0.3.0 |
rbln_npu_pcie_link_width |
N/A | Current PCIe link width | Lanes | v0.3.0 |
rbln_npu_device_info |
N/A | Device identity and static attributes exposed as labels | Always 1 | v0.3.0 |
rbln_up |
N/A | Whether the last metrics collection from rbln-smd succeeded |
0/1 | v0.3.1 |
Note
rbln_npu_health (legacy RBLN_DEVICE_STATUS:HEALTH) is a binary state metric. 0 means the NPU is active, while 1 means it is inactive.
Note
rbln_up is exposed as 0 between exporter start and the first collection cycle.
The exporter does not expose the following metrics when it cannot determine their values.
rbln_npu_power_state: devices whose daemon does not report a performance state valuerbln_npu_clock_frequency_mhz: clocks not implemented by the platformrbln_npu_pcie_link_speed_gts,rbln_npu_pcie_link_width: devices whose topology information could not be queried
Common NPU Metrics Label Attributes¶
| Label | Description |
|---|---|
name |
Character device node exposed by the kernel driver (Device.name, e.g., rbln0) |
uuid |
Globally unique identifier for the NPU device (Device.uuid) |
card |
Card product name surfaced via Device.card_name (e.g., RBLN-CA25) |
deviceID |
PCIe device ID reported in the proto (Device.dev_id, e.g., 1250) |
hostname |
Name of the Kubernetes node where the Pod using the device is scheduled |
driver_version |
Kernel driver build returned by VersionInfo.drv_version |
firmware_version |
Firmware revision returned by VersionInfo.fw_version |
Kubernetes NPU Metrics Label Attributes¶
| Label | Description |
|---|---|
namespace |
Namespace for the workload using the device. Taken from Pod.metadata.namespace |
container |
Name of the container consuming the NPU. Taken from Pod.spec.containers[].name |
pod |
Name of the Pod holding the NPU allocation. Taken from Pod.metadata.name |
Metric-specific Label Attributes¶
In addition to the common labels, rbln_npu_device_status and rbln_npu_clock_frequency_mhz use the state and clock labels, respectively.
| Label | Metric | Values |
|---|---|---|
state |
rbln_npu_device_status |
ready · busy · init · fault · finish · not_found |
clock |
rbln_npu_clock_frequency_mhz |
cp0 · cp1 · dc0 · dc1 · bus · shm · dram |
Device Info Metric Label Attributes¶
In addition to the common labels, rbln_npu_device_info exposes the device's static attributes with the following labels.
| Label | Description |
|---|---|
smc_version |
SMC firmware version |
pci_bus_id |
PCI bus address |
numa_node |
NUMA node number the device is attached to (-1 when NUMA information is unavailable) |
rsd_group |
RSD group the device belongs to |
cpu_list |
Local CPU list of the device |
is_vf |
Whether the device is an SR-IOV virtual function (VF) (true/false) |
parent_name |
Parent physical device name when the device is a VF |
num_vfs |
Number of VFs configured on the physical device |
Note
The exporter exposes the numa_node, rsd_group, and cpu_list labels as empty values when topology information cannot be queried.
Metrics Example¶
Here's a sample of the metrics text format the exporter produces (Prometheus-convention names; legacy names follow the same shape):