Hello,

I have only been using nagios on some Etch systems for a few months and when I get a check_disk warning or critical, I have wished that it would show just the affected partition(s) in the output so that I could decide how critical the problem was without running du on the box to see.

The --errors-only option, which I had overlooked, seems to do mostly meet the need by only listing disks before the pipe in the output if they have errors. It would be nice if even the cryptic data after the pipe could be suppressed since I don't have anything set up to use the data to log the data.

I /wish/ that the errors only (-e) option was used by default in the nagios-plugins disk.cfg. Doing this would make the web, email and "pager" messages show at least one of the warning or critical partitions at the front of the output string after "free space:". I think this would be a more useful default for the average nagios user than listing the verbose information for all partitions including the ones not in the error state.

I suspect that Filip may have not opened this bug in the first place if disk.cfg used /errors only/ by default. The output line can still potentially be long and cut off, but at least one of the problem partitions causing the plugin to exit with WARNING or CRITICAL would be listed at the first of the output.

It would be nice to know what the stuff after the pipe is for, but that and having an option to suppress it seems like an upstream bug and isn't something I am currently concerned about.

It seems like this bug is somewhere between normal and wish list and the bug should be able to move forward without more info if changing the default disk.cfg would not cause unforeseen trouble.

Since Filip no longer has access to Nagios here is the output of a partition without and with the /errors only/ option. I know this doesn't use a dozen partions, but it shows how only the partition with error gets reported more verbosely.

$ df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5             464M  273M  167M  63% /

$ df -h /var
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             3.9G  951M  2.9G  25% /var

# No --errors-only flag. Lists both partition sizes before the pipe
# even though only / is warning
$ /usr/lib/nagios/plugins/check_disk -w40% -c30% -p / -p /var
DISK WARNING - free space: / 166 MB (37% inode=85%); /var 2955 MB (75% inode=-);| /=272MB;277;324;0;463 /var=950MB;277;324;0;3906

# --errors-only makes only the problem partition, /, get listed before the pipe.
$ /usr/lib/nagios/plugins/check_disk -e -w40% -c30% -p / -p /var
DISK WARNING - free space: / 166 MB (37% inode=85%);| /=272MB;277;324;0;463 /var=950MB;277;324;0;3906

# Changing the targets lower so it is there longer an error:
$ /usr/lib/nagios/plugins/check_disk -e -w20% -c10% -p / -p /var
DISK OK| /=272MB;370;416;0;463 /var=950MB;370;416;0;3906

--
Jacob



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to