Skip to content

Add check_disk_smb results handling #848

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

meni2029
Copy link
Contributor

@meni2029 meni2029 commented Aug 19, 2025

General information

Some results of smbclient command in check_disk_smb returns default state UNKNOWN with summary "Result from smbclient not suitable". This PR adds handling of two additional results:

NT_STATUS_NO_LOGON_SERVERS => CRITICAL - No logon servers
NT_STATUS_IO_TIMEOUT => CRITICAL - Timeout

Default remains: UNKNOWN with summary "Result from smbclient not suitable".

Context

A service SMB Share flapping between UNKNOWN and CRITICAL states as some smbclient results fall into default case:

image

The smbclient results have been identified as:

session setup failed: NT_STATUS_NO_LOGON_SERVERS

session setup failed: NT_STATUS_IO_TIMEOUT

Proposed changes

Add conditional matching of the two identified results, in order for the service check to return dedicated state and summary.
The two new conditions are added after the existing ones, to avoid risk of altering existing conditions outcome. This is important for the NT_STATUS_IO_TIMEOUT, as connection issue could also contain error NT_STATUS_IO_TIMEOUT:

do_connect: Connection to 172.xx.xx.xx failed (Error NT_STATUS_IO_TIMEOUT)

After change:

image

smbclient results NT_STATUS_NO_LOGON_SERVERS and NT_STATUS_IO_TIMEOUT return CRITICAL with dedicated message instead of UNKNOWN with message "Result from smbclient not suitable"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants