summaryrefslogtreecommitdiffstats
path: root/plugins-scripts
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-10-03 22:57:51 +0200
committerGitHub <noreply@github.com>2023-10-03 22:57:51 +0200
commitd31dddadaf829d36b40ff02252dc523cf5078260 (patch)
treeee313776af36407267d74fcf3e1ded51d6624241 /plugins-scripts
parentc10d478162f0b32d5233451236b436a5853f859f (diff)
parent487d64a4e4122ca7b389b5e26b6cdf156c877c04 (diff)
downloadmonitoring-plugins-d31dddadaf829d36b40ff02252dc523cf5078260.tar.gz
Merge pull request #1411 from glensc/pld/nagios-plugins-check_disk_smb-zero-cap.patch
check_disk_smb: allow checking 0-sized resource (ex. IPC$)
Diffstat (limited to 'plugins-scripts')
-rw-r--r--plugins-scripts/check_disk_smb.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
index f4d33a7b..eda8dd48 100644
--- a/plugins-scripts/check_disk_smb.pl
+++ b/plugins-scripts/check_disk_smb.pl
@@ -226,7 +226,8 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) {
226 my ($total_bytes) = $1 * $2; 226 my ($total_bytes) = $1 * $2;
227 my ($occupied_bytes) = $1 * $2 - $avail_bytes; 227 my ($occupied_bytes) = $1 * $2 - $avail_bytes;
228 my ($avail) = $avail_bytes/1024; 228 my ($avail) = $avail_bytes/1024;
229 my ($capper) = int(($3/$1)*100); 229 my ($capper);
230 if ($1!=0) { $capper = int(($3/$1)*100) } else { $capper=100 };
230 my ($mountpt) = "\\\\$host\\$share"; 231 my ($mountpt) = "\\\\$host\\$share";
231 232
232 # TODO : why is the kB the standard unit for args ? 233 # TODO : why is the kB the standard unit for args ?