aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_disk.c
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> 2007-01-29 14:14:05 +0000
committerGravatar Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> 2007-01-29 14:14:05 +0000
commita69aa93a2c0305cb2168daba66b219c7de3bebde (patch)
tree54da622de315cf16a53550daa9bb469352bbf637 /plugins/check_disk.c
parentab24bcc0974057bb0960f5778c34ab397957bb4f (diff)
downloadmonitoring-plugins-a69aa93a2c0305cb2168daba66b219c7de3bebde.tar.gz
Revert 1643463 (reversed disk thresholds) keeping the thresholds checks.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1594 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r--plugins/check_disk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 476c8922..99a7201e 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -306,16 +306,16 @@ main (int argc, char **argv)
critical_high_tide = UINT_MAX;
if (path->freespace_units->warning != NULL) {
- warning_high_tide = path->freespace_units->warning->end;
+ warning_high_tide = dtotal_units - path->freespace_units->warning->end;
}
if (path->freespace_percent->warning != NULL) {
- warning_high_tide = abs( min( (double) warning_high_tide, (double) path->freespace_percent->warning->end/100*dtotal_units ));
+ warning_high_tide = abs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)*dtotal_units ));
}
if (path->freespace_units->critical != NULL) {
- critical_high_tide = path->freespace_units->critical->end;
+ critical_high_tide = dtotal_units - path->freespace_units->critical->end;
}
if (path->freespace_percent->critical != NULL) {
- critical_high_tide = abs( min( (double) critical_high_tide, (double) path->freespace_percent->critical->end/100*dtotal_units ));
+ critical_high_tide = abs( min( (double) critical_high_tide, (double) (1.0 - path->freespace_percent->critical->end/100)*dtotal_units ));
}
asprintf (&perf, "%s %s", perf,