diff --git a/hbd/client/plugins/filesystem_info.py b/hbd/client/plugins/filesystem_info.py index 4cdd7ef..e75463a 100644 --- a/hbd/client/plugins/filesystem_info.py +++ b/hbd/client/plugins/filesystem_info.py @@ -127,15 +127,15 @@ class FilesystemInfoPlugin(InfoPlugin): try: # Maximum filename length max_name = os.pathconf(partition.mountpoint, 'PC_NAME_MAX') - if max_name: + if max_name is not None: fs_info['maxfile'] = max_name except (OSError, ValueError): pass - + try: # Maximum path length max_path = os.pathconf(partition.mountpoint, 'PC_PATH_MAX') - if max_path: + if max_path is not None: fs_info['maxpath'] = max_path except (OSError, ValueError): pass diff --git a/hbd/server/threshold.py b/hbd/server/threshold.py index 9d88d83..07813d7 100644 --- a/hbd/server/threshold.py +++ b/hbd/server/threshold.py @@ -1556,7 +1556,7 @@ class ThresholdChecker: for mp in host.alert_states: # connectivity.* and rtt are managed by the connection state # machine, not by threshold config — never purge them. - if mp == "rtt" or mp.startswith("connectivity."): + if mp == "rtt" or mp.startswith("connectivity"): continue if self._find_threshold(configured, mp)[0] is not None: continue