[Nagiosplug-devel] Problem with check_disk in 1.4.3 on RH9 (Bugfix?)
James Fidell
james at cloud9.co.uk
Wed Apr 19 07:44:03 CEST 2006
Earlier I wrote:
> # nagios-plugins-1.4.2/plugins/check_disk -m -w 20% -c 5% -p /
> DISK OK - free space: / 591 MB (70%);| /=259MB;679;806;0;849
>
> # nagios-plugins-1.4.3/plugins/check_disk -m -w 20% -c 5% -p /
> INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP (0.0) and both
> should be between zero and 100 percent, inclusive for /
> check_disk: Could not parse arguments
> Usage: check_disk -w limit -c limit [-p path | -x device] [-t
> timeout][-m] [-e] [-W limit] [-K limit] [-v] [-q]
On a quick inspection of the code it looks like the c_idfp and w_idfp
elements of struct namelist aren't always being initialised when they
should be. The following patch fixes my particular problem:
--- check_disk.c~ 2006-04-19 13:56:39.000000000 +0100
+++ check_disk.c 2006-04-19 15:23:11.000000000 +0100
@@ -462,6 +462,8 @@
se->c_df = c_df;
se->w_dfp = w_dfp;
se->c_dfp = c_dfp;
+ se->w_idfp = w_idfp;
+ se->c_idfp = c_idfp;
se->found = 0;
se->found_len = 0;
*pathtail = se;
@@ -547,6 +549,8 @@
se->c_df = c_df;
se->w_dfp = w_dfp;
se->c_dfp = c_dfp;
+ se->w_idfp = w_idfp;
+ se->c_idfp = c_idfp;
se->found =0;
se->found_len = 0;
*pathtail = se;
but it isn't clear to me whether a similar change is required for the
options -x and -X
james
More information about the Devel
mailing list