aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> 2021-10-26 13:05:57 +0200
committerGravatar RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> 2021-10-26 17:07:09 +0200
commit1c0882def0d9ce4ed5b2d443884138622e6d839b (patch)
tree144285d62e8d8e6b3e2aef6321241f26e1516026
parent726a29a3ac4b155536099b8cae2bd517d56fb5f8 (diff)
downloadmonitoring-plugins-1c0882def0d9ce4ed5b2d443884138622e6d839b.tar.gz
hopefully fix warning high tide with percentage
-rw-r--r--plugins/check_disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index ecde4e59..1778b613 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -340,7 +340,7 @@ main (int argc, char **argv)
warning_high_tide = path->dtotal_units - path->freespace_units->warning->end;
}
if (path->freespace_percent->warning != NULL) {
- warning_high_tide = llabs( min( (double) warning_high_tide, (1.0 - path->freespace_percent->warning->end / 100 * path->dtotal_units) ));
+ warning_high_tide = llabs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)* path->dtotal_units ));
}
if (path->freespace_units->critical != NULL) {
critical_high_tide = path->dtotal_units - path->freespace_units->critical->end;