Skip to content

Feature request: option to exclude NVMe-oF / TCP NVMe devices (non-PCIe) #336

@anurag-bug

Description

@anurag-bug

Summary

Please add a configuration option to exclude remote NVMe devices, specifically NVMe over Fabrics or any NVMe device where the transport protocol is tcp (i.e., not pcie). This would prevent the exporter from attempting to scrape remote NVMe devices that are not locally attached.

Background

In environments where NVMe-oF is used, smartctl can discover NVMe devices exposed over the network. These are not local PCIe devices and may:

  • inflate the device list and metrics unexpectedly.
  • not be needed for monitoring.

Currently, automatic scanning includes these devices, and the existing include/exclude regex is based on device names rather than transport protocol.

Desired Behavior

Add an option to exclude remote NVMe devices by transport protocol. For example:

  • Exclude any NVMe device where nvme.transport_protocol != "pcie".
  • Or a specific flag like --smartctl.exclude-nvme-transport=tcp (or allow a list/regex).

Acceptance Criteria

  • A configurable option exists to exclude NVMe devices by transport protocol (e.g., tcp).
  • When enabled, the exporter skips those devices during scan and does not emit metrics for them.

Additional Context

If needed, I can provide redacted smartctl JSON or nvme list -v -o json output from an NVMe-oF device

Possible Detection Ideas

  • Use nvme list -v -o json to map /dev/nvmeXnY to controller transport (tcp vs pcie).
  • Fallback: sysfs.

Sysfs hints (if useful)

If sysfs can map a namespace/controller to its transport:

  • /sys/class/nvme/nvmeX/transport

Acceptance Criteria

  • Configurable option to exclude NVMe devices by transport protocol (e.g., TCP).
  • Devices excluded during auto-discovery and metrics collection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions