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
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.
Exported Metrics¶
The following metrics are exported for each NPU device, tagged with the device UUID, card name, and character device node (rblnN).
| Name | Description | Unit |
|---|---|---|
RBLN_DEVICE_STATUS:TEMPERATURE |
Temperature | °C |
RBLN_DEVICE_STATUS:CARD_POWER |
Power usage | W |
RBLN_DEVICE_STATUS:DRAM_USED |
DRAM in use | Bytes |
RBLN_DEVICE_STATUS:DRAM_TOTAL |
Total DRAM | Bytes |
RBLN_DEVICE_STATUS:UTILIZATION |
Utilization | % |
RBLN_DEVICE_STATUS:HEALTH |
NPU health status | 0/1 |
Note:
RBLN_DEVICE_STATUS:HEALTHis a binary state metric.0means the NPU is active, while1means it is inactive.
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 |
Hardware card string surfaced via DeviceInfo.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. |
Metrics Example¶
Here's a look at what the actual metrics look like.