[Nagiosplug-checkins] nagiosplug/plugins check_disk.c,1.83,1.84
Thomas Guyot
dermoth at users.sourceforge.net
Mon Jan 29 15:14:07 CET 2007
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26502/plugins
Modified Files:
check_disk.c
Log Message:
Revert 1643463 (reversed disk thresholds) keeping the thresholds checks.
Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- check_disk.c 27 Jan 2007 21:49:21 -0000 1.83
+++ check_disk.c 29 Jan 2007 14:14:05 -0000 1.84
@@ -306,16 +306,16 @@
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,
More information about the Commits
mailing list