Skip to content

dcgm: drop PCIe throughput fields removed in DCGM 4.7 from the exporter profile - #23964

Open
ktsaou wants to merge 1 commit into
netdata:masterfrom
ktsaou:dcgm-profile-drop-removed-pcie-fields
Open

ktsaou wants to merge 1 commit into
netdata:masterfrom
ktsaou:dcgm-profile-drop-removed-pcie-fields

Conversation

@ktsaou

@ktsaou ktsaou commented Sep 19, 2026

Copy link
Copy Markdown
Member
Summary

DCGM 4.7.0 removed DCGM_FI_DEV_PCIE_RX_THROUGHPUT (ID 201) and DCGM_FI_DEV_PCIE_TX_THROUGHPUT. With those two fields listed, dcgm-exporter 4.8.4 exits at startup:

failed to get counters: DCGM field "DCGM_FI_DEV_PCIE_RX_THROUGHPUT" (ID 201) is no longer supported; use "DCGM_FI_PROF_PCIE_RX_BYTES" instead

The Netdata profile (dcgm-exporter-netdata.csv) already enables the suggested replacements DCGM_FI_PROF_PCIE_RX_BYTES and DCGM_FI_PROF_PCIE_TX_BYTES, so this PR removes the two obsolete lines and updates the enabled-field count (123 to 121) in the profile header, TestExporterCSVSemantics, metadata.yaml and the generated integration page.

Test Plan
  • go test ./plugin/go.d/collector/dcgm/ passes.
  • On a host with driver 615.71.09, DCGM 4.7.0 and dcgm-exporter 4.8.4 (2x RTX PRO 6000 Blackwell), the exporter crash-looped with the stock profile and starts cleanly with the two lines removed; /metrics serves DCGM_FI_PROF_PCIE_RX_BYTES / DCGM_FI_PROF_PCIE_TX_BYTES for both GPUs.
Additional Information

Older DCGM releases still accept the removed fields, but the profiling replacements were already the enabled way to get PCIe throughput in this profile, so nothing is lost on those versions either.

For users: How does this change affect me?

Users of the DCGM collector who run the recommended dcgm-exporter-netdata.csv profile with DCGM 4.7 or newer: the exporter now starts instead of exiting on the removed fields. PCIe throughput continues to be collected from the profiling fields.


Summary by cubic

Drops two PCIe throughput fields that DCGM 4.7 removed from the dcgm-exporter profile so the exporter starts cleanly instead of exiting at startup.

  • The profile already enables the suggested replacements DCGM_FI_PROF_PCIE_RX_BYTES and DCGM_FI_PROF_PCIE_TX_BYTES, so PCIe throughput is still collected on both DCGM 4.7 and older releases.
  • Updates the enabled-field count from 123 to 121 in the profile header, test, metadata.yaml, and integration docs.

Written for commit ddaf5c7. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Documentation
    • Updated NVIDIA DCGM integration documentation to reflect the correct default exporter profile count of 121 enabled fields.
  • Tests
    • Updated validation to match the stock exporter field selection of 121 enabled fields.

…er profile

DCGM 4.7.0 no longer supports DCGM_FI_DEV_PCIE_RX_THROUGHPUT (201) and
DCGM_FI_DEV_PCIE_TX_THROUGHPUT. dcgm-exporter 4.8.4 refuses to start with a
counters file that lists them:

  failed to get counters: DCGM field "DCGM_FI_DEV_PCIE_RX_THROUGHPUT" (ID 201)
  is no longer supported; use "DCGM_FI_PROF_PCIE_RX_BYTES" instead

The replacements DCGM_FI_PROF_PCIE_RX_BYTES and DCGM_FI_PROF_PCIE_TX_BYTES are
already enabled in the profile, so the two obsolete lines are removed and the
enabled-field count goes from 123 to 121 in the header, the test and the docs.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 19, 2026

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

New Review Started

This review has been superseded by a new analysis

Grey Divider

Qodo Logo

@github-actions github-actions Bot added area/docs area/collectors Everything related to data collection collectors/go.d area/metadata Integrations metadata area/go labels Sep 19, 2026
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: adb6fa0d-21ee-465f-8c73-d75846ab2bfb

📥 Commits

Reviewing files that changed from the base of the PR and between 6822bb6 and ddaf5c7.

⛔ Files ignored due to path filters (1)
  • src/go/plugin/go.d/collector/dcgm/dcgm-exporter-netdata.csv is excluded by !**/*.csv
📒 Files selected for processing (3)
  • src/go/plugin/go.d/collector/dcgm/artifacts_test.go
  • src/go/plugin/go.d/collector/dcgm/integrations/nvidia_data_center_gpu_manager_dcgm.md
  • src/go/plugin/go.d/collector/dcgm/metadata.yaml

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The DCGM exporter field count changed from 123 to 121 in the semantics test and related documentation.

Changes

DCGM exporter field-count alignment

Layer / File(s) Summary
Align test and documentation field counts
src/go/plugin/go.d/collector/dcgm/artifacts_test.go, src/go/plugin/go.d/collector/dcgm/integrations/nvidia_data_center_gpu_manager_dcgm.md, src/go/plugin/go.d/collector/dcgm/metadata.yaml
The test and both documentation references now state that the Netdata exporter profile enables 121 fields. Optional fields remain commented in the integration documentation.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing PCIe throughput fields that DCGM 4.7 no longer supports from the exporter profile.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

qodo-code-review Bot commented Sep 19, 2026

Copy link
Copy Markdown

PR Summary by Qodo

dcgm: remove unsupported PCIe throughput fields from exporter profile

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Removes unsupported legacy PCIe throughput fields so DCGM 4.7+ exporters start successfully.
• Retains PCIe telemetry through already-enabled profiling byte fields.
• Synchronizes the 121-field invariant across tests and integration documentation.
Diagram

graph TD
  Test["Semantic Test"] --> Profile["121-Field Profile"] --> Exporter["DCGM Exporter"] --> Metrics["Profiling Metrics"] --> Collector["DCGM Collector"]
  Profile -. "count sync" .-> Metadata["Metadata YAML"] --> Docs["Integration Page"]
Loading
High-Level Assessment

Removing the unsupported fields is the appropriate approach because their profiling replacements are already enabled, preserving PCIe telemetry without version-specific profiles or runtime detection. Maintaining separate profiles for older DCGM versions would add unnecessary operational and documentation complexity.

Files changed (3) +3 / -3

Tests (1) +1 / -1
artifacts_test.goUpdate exporter profile field-count assertion +1/-1

Update exporter profile field-count assertion

• Changes the expected enabled-field count from 123 to 121 so semantic validation matches the supported exporter profile.

src/go/plugin/go.d/collector/dcgm/artifacts_test.go

Documentation (2) +2 / -2
nvidia_data_center_gpu_manager_dcgm.mdDocument the reduced default field count +1/-1

Document the reduced default field count

• Updates the generated DCGM integration page to state that the recommended profile enables 121 fields by default.

src/go/plugin/go.d/collector/dcgm/integrations/nvidia_data_center_gpu_manager_dcgm.md

metadata.yamlSynchronize DCGM profile metadata +1/-1

Synchronize DCGM profile metadata

• Updates the source integration metadata with the profile's new 121-field default count.

src/go/plugin/go.d/collector/dcgm/metadata.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (1)

Grey Divider


Action required

1. Generated documentation can drift 📜 Skill insight ⌂ Architecture
Description
The generated integration page is edited directly to change the enabled-field count instead of being
regenerated from metadata.yaml. Future metadata regeneration can overwrite this manual change,
leaving the published page inconsistent with the profile and its source metadata.
Code

src/go/plugin/go.d/collector/dcgm/integrations/nvidia_data_center_gpu_manager_dcgm.md[88]

+The Netdata profile enables 121 fields by default and lists optional fields from its source dataset as commented entries.
Relevance

●●● Strong

Recent DCGM precedent regenerates this page from metadata; manual generated-file edits risk
documented drift.

PR-#23787
PR-#22838

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed integration page contains a generated-file marker stating that it must not be edited
directly and identifies metadata.yaml as its producer. The PR modifies that generated page at the
enabled-field count while also changing the source metadata.

src/go/plugin/go.d/collector/dcgm/integrations/nvidia_data_center_gpu_manager_dcgm.md[1-7]
src/go/plugin/go.d/collector/dcgm/integrations/nvidia_data_center_gpu_manager_dcgm.md[88-88]
Skill: collectors-metadata-yaml

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The integration page is generated from `metadata.yaml` and must not be edited directly. The changed enabled-field count should be produced by the repository's metadata generation workflow.

## Fix Focus Areas
- src/go/plugin/go.d/collector/dcgm/integrations/nvidia_data_center_gpu_manager_dcgm.md[88-88]
- src/go/plugin/go.d/collector/dcgm/metadata.yaml[60-60]

## Recommended Fix
Keep the count change in `metadata.yaml`, remove the direct edit from the generated integration page, and regenerate the page using the repository's documented metadata generation command before committing the generated output if required by the delivery workflow.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 126 rules
✅ Skills: 4 invoked
  collectors-authoring
  repo-skill-authoring
  collectors-go-framework-v2
  collectors-metadata-yaml
✅ Cross-repo context — repo relationships
Review mode: 🚀 Fast: This is a small, localized profile cleanup with synchronized count and documentation updates, and no new runtime logic or high-risk behavior.

Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

(raw download: `https://raw.githubusercontent.com/netdata/netdata/master/src/go/plugin/go.d/collector/dcgm/dcgm-exporter-netdata.csv`).

The Netdata profile enables 123 fields by default and lists optional fields from its source dataset as commented entries.
The Netdata profile enables 121 fields by default and lists optional fields from its source dataset as commented entries.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Generated documentation can drift 📜 Skill insight ⌂ Architecture

The generated integration page is edited directly to change the enabled-field count instead of being
regenerated from metadata.yaml. Future metadata regeneration can overwrite this manual change,
leaving the published page inconsistent with the profile and its source metadata.
Agent Prompt
## Issue description
The integration page is generated from `metadata.yaml` and must not be edited directly. The changed enabled-field count should be produced by the repository's metadata generation workflow.

## Fix Focus Areas
- src/go/plugin/go.d/collector/dcgm/integrations/nvidia_data_center_gpu_manager_dcgm.md[88-88]
- src/go/plugin/go.d/collector/dcgm/metadata.yaml[60-60]

## Recommended Fix
Keep the count change in `metadata.yaml`, remove the direct edit from the generated integration page, and regenerate the page using the repository's documented metadata generation command before committing the generated output if required by the delivery workflow.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Confidence score: 5/5

  • In src/go/plugin/go.d/collector/dcgm/dcgm-exporter-netdata.csv, stale RX/TX throughput annotation comments remain after the related entries changed, which could leave misleading metadata for maintainers or consumers; remove or update the orphaned comments.

You’re at about 94% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/go/plugin/go.d/collector/dcgm/dcgm-exporter-netdata.csv">

<violation number="1" location="src/go/plugin/go.d/collector/dcgm/dcgm-exporter-netdata.csv:10">
P3: The two `# numeric=dcgm.gpu.raw.dcgm_fi_dev_pcie_rx_throughput` / `..._tx_throughput (raw; physical unit not established)` annotation comments (current lines 908-909) were left behind when their `DCGM_FI_DEV_PCIE_RX/TX_THROUGHPUT` field lines were deleted. They are the only annotations in the file that do not sit directly above a `DCGM_FI_*` entry (enabled or commented); every other `# numeric=`/`# context=`/`# metadata=` annotation documents the field on the following line. With no field line beneath them they now describe entries that do not exist in the profile, which contradicts the header's "uncomment one line" guidance. Remove the two orphan annotation lines together with the removed fields.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant Profile as dcgm-exporter-netdata.csv
    participant Exporter as dcgm-exporter daemon on host
    participant DCGM as NVIDIA DCGM library in driver
    participant Coll as go.d dcgm collector plugin
    participant Agent as Netdata Agent metrics database
    participant CI as dcgm collector unit tests

    Note over Profile,Agent: Runtime data flow (current state)

    Exporter->>Profile: Load enabled field list at startup
    Profile-->>Exporter: 121 enabled fields (PCIe via DCGM_FI_PROF_PCIE_RX_BYTES / TX_BYTES)
    Exporter->>DCGM: Query enabled fields through DCGM API

    alt All requested fields supported
        DCGM-->>Exporter: Per-GPU metric values
        Exporter->>Exporter: Serve /metrics endpoint (Prometheus text format)
        Coll->>Exporter: Scrape /metrics over HTTP
        Exporter-->>Coll: GPU metrics (counters, gauges, profiling bytes)
        Coll->>Agent: Submit collected chart data
    else Field not supported by DCGM 4.7+
        DCGM-->>Exporter: Error: field is no longer supported
        Exporter->>Exporter: Abort startup, no /metrics endpoint
    end

    Note over CI,Profile: Validation path (TestExporterCSVSemantics)

    CI->>Profile: Parse CSV rows and count enabled fields
    CI->>CI: Compare enabled count to expected stock baseline
    alt 121 enabled fields
        CI-->>CI: Test passes
    else Count mismatch
        CI-->>CI: Test fails (preserve stock field selection)
    end

    Note over CI,Profile: metadata.yaml and the integration page state the same 121-field baseline
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@@ -7,8 +7,8 @@
# Example:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The two # numeric=dcgm.gpu.raw.dcgm_fi_dev_pcie_rx_throughput / ..._tx_throughput (raw; physical unit not established) annotation comments (current lines 908-909) were left behind when their DCGM_FI_DEV_PCIE_RX/TX_THROUGHPUT field lines were deleted. They are the only annotations in the file that do not sit directly above a DCGM_FI_* entry (enabled or commented); every other # numeric=/# context=/# metadata= annotation documents the field on the following line. With no field line beneath them they now describe entries that do not exist in the profile, which contradicts the header's "uncomment one line" guidance. Remove the two orphan annotation lines together with the removed fields.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/go/plugin/go.d/collector/dcgm/dcgm-exporter-netdata.csv, line 10:

<comment>The two `# numeric=dcgm.gpu.raw.dcgm_fi_dev_pcie_rx_throughput` / `..._tx_throughput (raw; physical unit not established)` annotation comments (current lines 908-909) were left behind when their `DCGM_FI_DEV_PCIE_RX/TX_THROUGHPUT` field lines were deleted. They are the only annotations in the file that do not sit directly above a `DCGM_FI_*` entry (enabled or commented); every other `# numeric=`/`# context=`/`# metadata=` annotation documents the field on the following line. With no field line beneath them they now describe entries that do not exist in the profile, which contradicts the header's "uncomment one line" guidance. Remove the two orphan annotation lines together with the removed fields.</comment>

<file context>
@@ -7,8 +7,8 @@
 #
-# This profile contains 623 fields from its original DCGM source dataset.
-# Exactly 123 fields are enabled by default below (127 max per field group).
+# This profile contains 621 fields from its original DCGM source dataset.
+# Exactly 121 fields are enabled by default below (127 max per field group).
 # To enable a different field, uncomment one line and comment another enabled line.
</file context>

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/collectors Everything related to data collection area/docs area/go area/metadata Integrations metadata collectors/go.d

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant