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-tcp] Supports option to monitor that ports are closed. #767

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

tukaelu
Copy link
Contributor

@tukaelu tukaelu commented Sep 20, 2023

TCP connection monitoring is provided by a mechanism that assumes the port is open.

In some cases, it is possible that the state in which the port is closed is correct, and in such cases, the following shell workaround can be used.

[plugin.checks.dummy]
command = "check-tcp -H <host> -p <port> && exit 2 || exit 0"

However, since it is more convenient to be provided as an option, we have added a --expect-closed flag to determine that the state in which the port is closed is normal.

When this option is enabled, it will only work for processes that make connections.

@tukaelu tukaelu self-assigned this Sep 20, 2023
@ne-sachirou ne-sachirou self-requested a review September 20, 2023 05:52
Copy link
Member

@ne-sachirou ne-sachirou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙆‍♀️

@ne-sachirou ne-sachirou merged commit 5cdf376 into master Sep 21, 2023
@ne-sachirou ne-sachirou deleted the improve-check-tcp branch September 21, 2023 05:48
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 this pull request may close these issues.

2 participants