[monitoring-plugins] tests: check_disk_smb may exit with critical for ...
Sven Nierlein
git at monitoring-plugins.org
Thu Jul 31 13:30:08 CEST 2014
Module: monitoring-plugins
Branch: master
Commit: d832030e38f75e118ea519c08b5d3b491068b95d
Author: Sven Nierlein <Sven.Nierlein at consol.de>
Date: Thu Jul 31 11:43:47 2014 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=d832030
tests: check_disk_smb may exit with critical for unresponsive hosts too
Unknown (ex. debian 7)
%> ./check_disk_smb -H 1.1.1.1 -s np_foobar -vvv
/usr/bin/smbclient //1.1.1.1/np_foobar -U guest% -c du
No Answer from Client
Critical (ex. debian 8)
%> ./check_disk_smb -H 1.1.1.1 -s np_foobar -vvv
/usr/bin/smbclient //1.1.1.1/np_foobar -U guest% -c du
Connection to 1.1.1.1 failed
CRITICAL
Signed-off-by: Sven Nierlein <Sven.Nierlein at consol.de>
---
plugins-scripts/t/check_disk_smb.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins-scripts/t/check_disk_smb.t b/plugins-scripts/t/check_disk_smb.t
index 831f388..c2e8bbb 100644
--- a/plugins-scripts/t/check_disk_smb.t
+++ b/plugins-scripts/t/check_disk_smb.t
@@ -90,7 +90,7 @@ SKIP: {
SKIP: {
skip "no non responsive host defined", 1 if ( ! $host_nonresponsive );
$res = NPTest->testCmd( "./$plugin -H $host_nonresponsive -s np_foobar ");
- cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" );
+ cmp_ok( $res->return_code, '>=', 2, "Exit CRITICAL/UNKNOWN with non responsive host" );
}
}
More information about the Commits
mailing list