-
Notifications
You must be signed in to change notification settings - Fork 635
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
retries 0 is not respected #785
Comments
That is very strange. I did some tests and found that the retries is correctly parsed from the generator.yml when you run It seems to do the same thing for other values like This seems to be a bug in the yaml library output. Or possibly the way the walk parameters are inlined in the yaml struct. |
SuperQ
added a commit
that referenced
this issue
Aug 3, 2022
Fix parsing of `0` in retries in the generator config by making the struct value a pointer[0]. Fixes: #785 [0]: https://www.sohamkamani.com/golang/omitempty/#the-difference-between-0--and-nil Signed-off-by: SuperQ <[email protected]>
SuperQ
added a commit
that referenced
this issue
Aug 3, 2022
Fix parsing of `0` in retries in the generator config by making the struct value a pointer[0]. Fixes: #785 [0]: https://www.sohamkamani.com/golang/omitempty/#the-difference-between-0--and-nil Signed-off-by: SuperQ <[email protected]>
SuperQ
added a commit
that referenced
this issue
Aug 4, 2022
Fix parsing of `0` in retries in the generator config by making the struct value a pointer[0]. Fixes: #785 [0]: https://www.sohamkamani.com/golang/omitempty/#the-difference-between-0--and-nil Signed-off-by: SuperQ <[email protected]>
SuperQ
added a commit
that referenced
this issue
Aug 4, 2022
Fix parsing of `0` in retries in the generator config by making the struct value a pointer[0]. Fixes: #785 [0]: https://www.sohamkamani.com/golang/omitempty/#the-difference-between-0--and-nil Signed-off-by: SuperQ <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Host operating system: output of
uname -a
Ubuntu 18.04LTS
snmp_exporter version: output of
snmp_exporter -version
snmp_exporter 0.19
What device/snmpwalk OID are you using?
N/A
If this is a new device, please link to the MIB(s).
N/A
What did you do that produced an error?
configure a device collection using the option:
retries 0
generate the configuration
What did you expect to see?
retries 0 appear in the generated configuration
What did you see instead?
The line is not placed in the snmp.yml output. Causing it to default to retries: 3.
Clarify the documentation to indicate if retries 0 (no retries) is a supported configuration or not. If it is not, is there a reason for this. Some devices cannot be polled twice in a row without a delay, otherwise the snmp stacks will crash.
The text was updated successfully, but these errors were encountered: