Skip to content
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 definition for snmp_exporter #17

Closed
RichiH opened this issue Jan 4, 2016 · 6 comments · Fixed by #481
Closed

Timeout definition for snmp_exporter #17

RichiH opened this issue Jan 4, 2016 · 6 comments · Fixed by #481

Comments

@RichiH
Copy link
Member

RichiH commented Jan 4, 2016

While I can set a timeout for the scraping of the exporter, I can't set a timeout for when the snmp_exporter stops trying, internally. I can't seem to find an option within the exporter codebase, either.

Unless I am missing something, an option to have snmp_exporter jobs kill themselves after X time would be appreciated.

@brian-brazil
Copy link
Contributor

There's no such option currently, but I'd be happy to accept a PR.

@brian-brazil
Copy link
Contributor

There's an option now, however it's not of too much use. The upstream library needs improvements in the timeout department, preferably by using contexts.

@brian-brazil
Copy link
Contributor

The other option is to use the raw BulkGet calls that the library exposes, which would probably be simpler.

@SuperQ
Copy link
Member

SuperQ commented Oct 29, 2018

We can how handle this like we do in the blackbox_exporter0 and get the timeout from X-Prometheus-Scrape-Timeout-Seconds headers.

@brian-brazil
Copy link
Contributor

The underlying snmp library needs better timeout handling first.

@brian-brazil
Copy link
Contributor

gosnmp/gosnmp#203 will permit us to do this.

brian-brazil added a commit that referenced this issue Feb 14, 2020
When Prometheus times out the scrape and closes the http connection,
this will now make the snmp walk stop.

Fixes #17

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
brian-brazil added a commit that referenced this issue Feb 14, 2020
When Prometheus times out the scrape and closes the http connection,
this will now make the snmp walk stop.

Fixes #17

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
brian-brazil added a commit that referenced this issue Feb 14, 2020
When Prometheus times out the scrape and closes the http connection,
this will now make the snmp walk stop.

Fixes #17

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
brian-brazil added a commit that referenced this issue Feb 14, 2020
When Prometheus times out the scrape and closes the http connection,
this will now make the snmp walk stop.

Fixes #17

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants