improve(go.d/snmp): add manual_profiles option#21023
Merged
ilyam8 merged 4 commits intonetdata:masterfrom Sep 21, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a manual_profiles configuration option to the SNMP collector to enable profile-based metric collection for devices that don't provide a sysObjectID (such as certain printers).
- Added
manual_profilesarray field to the Config struct for specifying fallback profiles - Modified profile selection logic to use manual profiles when sysObjectID is empty
- Updated test cases and configuration examples to demonstrate the new functionality
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/go/plugin/go.d/collector/snmp/config.go | Added ManualProfiles field to Config struct |
| src/go/plugin/go.d/collector/snmp/collect.go | Updated profile setup to pass manual profiles parameter |
| src/go/plugin/go.d/collector/snmp/ddsnmp/profile.go | Modified FindProfiles function to handle manual profile fallback logic |
| src/go/plugin/go.d/collector/snmp/ddsnmp/profile_test.go | Added test case and updated function calls for manual profiles |
| src/go/plugin/go.d/collector/snmp/config_schema.json | Added JSON schema definition for manual_profiles configuration |
| src/go/plugin/go.d/collector/snmp/testdata/config.yaml | Added test configuration example |
| src/go/plugin/go.d/collector/snmp/testdata/config.json | Added JSON test configuration example |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
Author
|
cc @ralphm |
vkalintiris
approved these changes
Sep 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new configuration option,
manual_profiles, to the SNMP collector.Problem:
Solution:
manual_profilesconfig option (array of profile names).generic-device, notgeneric-device.yaml).manual_profiles.manual_profilesare unavailable, no profiles are applied.Test Plan
Additional Information
For users: How does this change affect me?