-
Notifications
You must be signed in to change notification settings - Fork 4
#262 #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#262 #263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the SNMP Server output plugin to support an enhanced OID mapping structure and adds improved error handling. The main changes include restructuring the YAML configuration to support nested OID definitions and adding comprehensive try-catch blocks with step-based error tracking throughout the JavaScript implementation.
Key Changes:
- Enhanced OID mapping structure in YAML config to support nested OID objects with additional metadata fields
- Added comprehensive error handling with step-based error messages across all functions
- Fixed logic bug in typeCasting function for integer range validation
- Added support for conditional authentication/authorization based on SNMP version
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 25 comments.
| File | Description |
|---|---|
| config/outputs.disabled/yaml/10.SNMPServer_Output.yaml | Updated OID mapping structure from string to nested object with "OID" field |
| config/objects/nOutput_SNMPServer.js | Complete refactor with error handling, bug fixes, support for OIDList templates, regex-based attribute matching, and enhanced data type handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Error so the snmpCommunity doesn't default to public for security reasons. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Change of nOutput_SNMPServer enabling the OID value for the alert as a regular expression. Also enabling a OIDList associated to the alert, instead of just the value.