-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: snmp input plugin errors if mibs folder doesn't exist (#10346) #10354
Conversation
@MyaLongmire @reimda what is the behavior we want? Master currently stops Telegraf is a MIB is not found, this changes that to log the error, and keep processing. |
@powersj We want it to be possible to use the snmp plugin without mibs, but also for telegraf to fail with an error if the user intentionally set the mib directory in telegraf.conf but made a typo or entered an invalid mib directory. It looks like this PR goes too far and makes all directory errors into warnings. |
} | ||
folders = append(folders, mibPath) |
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.
Is there a reason this got moved?
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.
Yes, in case we don't find any mibs, we don't want to append mibPath to folders.
👍 This pull request doesn't change the Telegraf binary size 📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
Thank you! |
…nfluxdata#10346) (influxdata#10354)" This reverts commit 457c98f.
@reimda @powersj @MyaLongmire Could it be that since this change, snmp_traps isn't loading anymore? #10548 |
Required for all PRs:
resolves #10355
When there is no MIB folder, the snmp input plugin with exit with an error: e00147d.
This change makes it log a warning and continue (the plugin works fine even without MIBs).
It also adds a unit test which would have caught the issue.