Skip to content

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"
@CheckmkCI CheckmkCI closed this in 2a6d383 Sep 16, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants