Skip to content

feat(inputs.nvidia_smi): add NVIDIA v13 schema support#18690

Open
lbatalha wants to merge 2 commits intoinfluxdata:masterfrom
lbatalha:master
Open

feat(inputs.nvidia_smi): add NVIDIA v13 schema support#18690
lbatalha wants to merge 2 commits intoinfluxdata:masterfrom
lbatalha:master

Conversation

@lbatalha
Copy link
Copy Markdown

Summary

This adds support for nvsmi_device_v13.dtd schema.

I based myself on the work done in #18176.
I did not try to resolve the pstate part of #17417 but I did move serial to a tag, should pstate no longer be a tag?

I do not have a GPU capable of reporting ECC stats so I was unable to fully test that feature, though the two fields that do have values are reported correctly.

I have also fixed the typo in the error message and some GPUs were incorrectly labelled RTC instead of RTX

Checklist

Related issues

resolves #17482 and #17416 - partial #17417 fix

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Apr 10, 2026
@telegraf-tiger
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @lbatalha!

You are doing way too much in this PR and you should split it into at least three ones

  • cleaning up existing code without any change in functionality
  • fix issue in existing code around the set-if-used functions (if any)
  • add support for schema v13

This makes PRs easier to review and allows us to pin-point behavior changes to a certain commit of issues appear...

Comment on lines +10 to 12
if v == "N/A" || v == "" || v == "Requested functionality has been deprecated" {
return
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we move this check to a function please?

Suggested change
if v == "N/A" || v == "" || v == "Requested functionality has been deprecated" {
return
}
if !isUsed(v){
return
}

with

func isUsed(v string) bool {
		return v == "N/A" || v == "" || v == "Requested functionality has been deprecated" 
}

However, you are now removing values from tags that were passed on before so you are changing the series produced by this plugin and in turn break backward compatibility!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hmm, then perhaps we should retain existing behavior.

@srebhan srebhan self-assigned this Apr 17, 2026
@srebhan srebhan changed the title feat(nvidia_smi): add NVIDIA v13 schema support feat(inputs.nvidia_smi): add NVIDIA v13 schema support Apr 17, 2026
@telegraf-tiger telegraf-tiger bot added the plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins label Apr 17, 2026
@lbatalha
Copy link
Copy Markdown
Author

Oh good point, I will clean up this PR to contain only the schema v13 changes for now.

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

Labels

feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[inputs.nvidia_smi] Unknown schema version "v13", using latest know schema for parsing

2 participants