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

check_ssh_login plugin incorrectly handles configured timeout #179

Closed
atc0005 opened this issue Jan 23, 2024 · 1 comment · Fixed by #188
Closed

check_ssh_login plugin incorrectly handles configured timeout #179

atc0005 opened this issue Jan 23, 2024 · 1 comment · Fixed by #188
Assignees
Labels
bug Something isn't working timeout
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Jan 23, 2024

Overview

By default the plugin is configured with a 10 seconds timeout intended to prevent connection attempts from hanging.

Today one the systems monitored by a Nagios XI system I manage went down and Nagios XI ended up forcefully terminating the service check after 300.01 seconds (300s global timeout value).

When I manually tested against a separate, confirmed down system I observed fast failure responses.

References

@atc0005 atc0005 added bug Something isn't working timeout labels Jan 23, 2024
@atc0005 atc0005 added this to the Future milestone Jan 23, 2024
@atc0005 atc0005 self-assigned this Jan 23, 2024
@atc0005
Copy link
Owner Author

atc0005 commented Jan 23, 2024

After a brief review of the plugin code I found where the timeout is applied inconsistently. In particular, the net.Dial call lacks any configured timeout.

The supported timeout is supplied to other portions of the codebase as intended.

I should go back and ensure that a context is used as I believe I originally intended. This should make it easier to propagate the intended timeout value consistently.

@atc0005 atc0005 changed the title Plugin is forcefully terminated by Nagios when timeout is reached check_ssh_login plugin incorrectly handles configured timeout Jan 23, 2024
atc0005 added a commit that referenced this issue Jan 26, 2024
Create context based on user specified timeout and pass down
where needed to allow timeout control to function as intended.

refs GH-179
@atc0005 atc0005 modified the milestones: Future, Next Release Jan 26, 2024
atc0005 added a commit that referenced this issue Feb 2, 2024
Create context based on user specified timeout and pass down
where needed to allow timeout control to function as intended.

refs GH-179
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working timeout
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant