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

Negative maxTimeoutSeconds #868

Closed
zhdkirill opened this issue Jan 25, 2022 · 0 comments · Fixed by #869
Closed

Negative maxTimeoutSeconds #868

zhdkirill opened this issue Jan 25, 2022 · 0 comments · Fixed by #869

Comments

@zhdkirill
Copy link
Contributor

Setting a small timeout value in a scraper (Prometheus) without changing the default offset leads to negative timeout values.
Prometheus configured to scrape every 200ms with default Blackbox offset of 500ms leads to timeout of -0.3s.

The possibility of a negative value of maxTimeoutSeconds is not checked here.

if module.Timeout.Seconds() < maxTimeoutSeconds && module.Timeout.Seconds() > 0 {

zhdkirill added a commit to zhdkirill/blackbox_exporter that referenced this issue Jan 25, 2022
zhdkirill added a commit to zhdkirill/blackbox_exporter that referenced this issue Jan 25, 2022
Fixes prometheus#868

Signed-off-by: Kirill Zhdanov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant