Skip to content

check_by_ssh --unknown-timeout does not work as expected #2024

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

Open
vladki77 opened this issue Oct 4, 2024 · 0 comments
Open

check_by_ssh --unknown-timeout does not work as expected #2024

vladki77 opened this issue Oct 4, 2024 · 0 comments

Comments

@vladki77
Copy link

vladki77 commented Oct 4, 2024

I was really looking forward to the functionality promised by --unknown-timeout (-U) implemented by #1123 and #1774.
But ./check_by_ssh -H 192.168.x.y -U -C true still returns: "CRITICAL - Plugin timed out after 10 seconds"

I've checked the source code and found out that it returns UNKNOWN only if SSH returns 255, i.e. it has its own timeout set below the timeout of the plugin, e.g. ./check_by_ssh -H 192.168.x.y -U -oConnectTimeout=9 -C true. Without that, ssh times out after 3 minutes (YMMW), while the plugin usually times out much sooner, and returns CRITICAL even if -U is set.

So it would make sense, to set -oConnectTimeout to 1s less than the timeout on the plugin (-t). At least if -U is specified, but preferably always.

OTOH, there are situations, when the connection is established (at least on TCP level), and the processing of the remote command takes too long - i.e. due to high load, or DNS problems. Those cases are not catched by -oConnectTimeout, and again result in CRITICAL, regardless of -U setting. But this may be desirable in some situations.

Please consider either
a) setting -oConnectTimeout automatically
b) (maybe separate) function to report UNKNOWN even if the remote command takes too long to process

Thank you
Vladislav Kurz

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

No branches or pull requests

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy