diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-03 20:57:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 20:57:51 (GMT) |
commit | d31dddadaf829d36b40ff02252dc523cf5078260 (patch) | |
tree | ee313776af36407267d74fcf3e1ded51d6624241 /plugins-scripts | |
parent | c10d478162f0b32d5233451236b436a5853f859f (diff) | |
parent | 487d64a4e4122ca7b389b5e26b6cdf156c877c04 (diff) | |
download | monitoring-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.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index f4d33a7..eda8dd4 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 ? |