-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Timeout cannot be configured for snmp receiver #25885
Labels
Comments
technimad-splunk
added
enhancement
New feature or request
needs triage
New item requiring triage
labels
Aug 18, 2023
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
technimad-splunk
changed the title
Timeout cannot be configured
Timeout cannot be configured for snmp receiver
Aug 18, 2023
Seems reasonable. Is this a change you could contribute @technimad-splunk? |
I will give it a go. Seems trivial to add. |
dmitryax
pushed a commit
that referenced
this issue
Aug 28, 2023
**Description:** The timeout of snmp requests was hard coded to 5 seconds. This commit adds timeout to the configuration of this receiver. The timeout can now be set using the timeout key at the higest level in the configuration. The default is left at 5 seconds. **Link to tracking Issue:** #25885 **Testing:** Updated `TestNewFactory` method to reflect new default config. Ran receiver against devices demanding a high timeout. During testing added extra logging statements to check if timeout setting was propagated correctly to the underlying SNMP library and if it was reflected in the SNMP commands executed. Tests succeeded. Removed extra logging statements as we shouldn't create a log per datapoint received in production. **Documentation:** Added the new config option `timeout` to README.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
receiver/snmp
Is your feature request related to a problem? Please describe.
Some devices are slow to respond. It can take more than the hard coded 5 seconds to get a reply. Currently these requests fail, as they time out.
the following message is logged when this happens:
Describe the solution you'd like
Make the timeout configurable. Use a
timeout
parameter at the level the connection is defined i.e.:Describe alternatives you've considered
Alternative for now is to limit the number of oid to retrieve per receiver configuration. Effectively splitting a configuration in multiple receivers, and hope all will receive data within 5 seconds.
Additional context
Current timeout is defined here:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/snmpreceiver/client.go#L65
The text was updated successfully, but these errors were encountered: