[Nagiosplug-devel] [ nagiosplug-Patches-2506958 ] check_disk ignore non-matched regexp

SourceForge.net noreply at sourceforge.net
Wed Jan 14 13:18:10 CET 2009

Patches item #2506958, was opened at 2009-01-14 12:14
Message generated for change (Comment added) made by paulhaldane
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Enhancement
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paul Haldane (paulhaldane)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_disk ignore non-matched regexp

Initial Comment:
Patch against Plugin Version (-V output):
 check_disk v2025 (nagios-plugins 1.4.13)
Plugin Name: check_disk
Example Plugin Commandline:
check_disk -w 10% -c 5% -e -L -A
  -C -w 6% -c 3% -r '.*sapdata.*'
  -X tmpfs 
Tested on operating system: Solaris 10
Tested on architecture:
Tested with compiler: gcc 3.3.2

Patch adds a new option (-n) which tells check_disk not to exit with error if we use -R/-r and the supplied regular expression doesn't match any filesystems.
We find this useful as we have some filesystems that we run with less free space than others (because the usage will only increase with explicit administrator action) and so want to set tighter thresholds in nrpe.conf.
However if we use the same check_disk options on all hosts, machines which don't have any matching filesystems will flag up an error.
The -n option needs to appear before -R/-r if it's used.


>Comment By: Paul Haldane (paulhaldane)
Date: 2009-01-14 12:18


Example commmand line should be 

$ ~/check_disk+ -w 10% -c 5% -e -L -A -C -w 6% -c 4% -n -r '.*sapdata.*'
-X tmpfs

which gives output like

DISK OK| /=2210MB;35454;37424;0;39394 /dev=2210MB;35454;37424;0;39394
/usr/sap/NUI=788MB;3629;3831;0;4033 /var/home=815MB;35454;37424;0;39394

Without the -n we get

$ ~/check_disk+ -w 10% -c 5% -e -L -A -C -w 6% -c 4% -r '.*sapdata.*' -X
DISK UNKNOWN: Regular expression did not match any path or disk -


You can respond by visiting: 

More information about the Devel mailing list