You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a problem with this setting in the following cases:
--timeout-offset=0: Prometheus might fail to scrape blackbox_exporter as the timeout (when combined with the network latency) might exceed Prometheus scrape timeout (that's the reason it's not 0 by default).
--timeout-offset=0.5: it's not possible to have HTTP modules that expect response faster than 0.5 (as timeout: 500ms effectively becomes timeout: 0ms).
Would it be possible to apply the offset (timeoutSeconds -= *timeoutOffset ) only when there's no explicitly defined timeout for a module? Meaning, that if the user explicitly set timeout field (which, as per the conditions, must be more than 0 and less than Prometheus scrape timeout) for some specific module, we can assume the user knows what he's doing and we use this timeout as is (without applying any offset).
An alternative can also be having per-module timeout-offset property, which allows the module to override not only the default time but default offset as well.
I can do a PR if agreed.
The text was updated successfully, but these errors were encountered:
As per the following code, blackbox_exporter always applies
--timeout-offset
(defaulting to0.5s
) to the timeout:blackbox_exporter/main.go
Lines 75 to 92 in dc53582
There's a problem with this setting in the following cases:
--timeout-offset=0
: Prometheus might fail to scrape blackbox_exporter as the timeout (when combined with the network latency) might exceed Prometheus scrape timeout (that's the reason it's not0
by default).--timeout-offset=0.5
: it's not possible to have HTTP modules that expect response faster than0.5
(astimeout: 500ms
effectively becomestimeout: 0ms
).Would it be possible to apply the offset (
timeoutSeconds -= *timeoutOffset
) only when there's no explicitly defined timeout for a module? Meaning, that if the user explicitly settimeout
field (which, as per the conditions, must be more than 0 and less than Prometheus scrape timeout) for some specific module, we can assume the user knows what he's doing and we use this timeout as is (without applying any offset).An alternative can also be having per-module
timeout-offset
property, which allows the module to override not only the default time but default offset as well.I can do a PR if agreed.
The text was updated successfully, but these errors were encountered: