Skip to content

feat(inputs.snmp): Add option to stop polling on first error - #17948

Merged
skartikey merged 3 commits into
influxdata:masterfrom
Super-Visions:feat/inputs/snmp/continue-on-error
Nov 6, 2025
Merged

feat(inputs.snmp): Add option to stop polling on first error#17948
skartikey merged 3 commits into
influxdata:masterfrom
Super-Visions:feat/inputs/snmp/continue-on-error

Conversation

@Hipska

@Hipska Hipska commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Summary

When polling fails for the first table, the plugin simply continues to polling the next table, which will most likely also fail.

The addition of a new option to stop polling on such failures reduces the time this plugin takes for wrongly configured agents and the number of similar log entries.

For example, with a default configuration and a timing out agent, the time it would take to finish a gather cycle would be around: 3 * 5s * number of configured tables. Given that usual interval for snmp devices is 1m, only having 4 tables would risk the plugin missing the next gather interval.

Checklist

@telegraf-tiger telegraf-tiger Bot added area/snmp 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 labels Nov 5, 2025

@srebhan srebhan left a comment

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.

Thanks @Hipska! Just a suggestion to invert the option, otherwise the code looks good.

Comment thread plugins/inputs/snmp/README.md Outdated
@srebhan srebhan self-assigned this Nov 5, 2025
@Hipska
Hipska force-pushed the feat/inputs/snmp/continue-on-error branch from a0fc438 to 7a9eea4 Compare November 6, 2025 08:20
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 6, 2025
@srebhan srebhan assigned skartikey and mstrandboge and unassigned srebhan Nov 6, 2025

@skartikey skartikey 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.

@Hipska Looks good! Just 1 typo.

Comment thread plugins/inputs/snmp/snmp.go Outdated
Co-authored-by: skartikey <1942366+skartikey@users.noreply.github.com>
@telegraf-tiger

telegraf-tiger Bot commented Nov 6, 2025

Copy link
Copy Markdown
Contributor
@skartikey
skartikey merged commit 286f16c into influxdata:master Nov 6, 2025
27 checks passed
@github-actions github-actions Bot added this to the v1.37.0 milestone Nov 6, 2025
@Hipska
Hipska deleted the feat/inputs/snmp/continue-on-error branch November 6, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/snmp 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 ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

4 participants