disk checks unreliable

Jeffrey Watts jeffrey.w.watts at gmail.com
Thu Oct 6 07:42:09 CEST 2011


The check is working correctly - /mnt/store is a valid path in both
circumstances.  Remember, in Unix mounted filesystems all sit on top of the
/ filesystem, so when you umount the filesystem on /mnt/store, that
mountpoint still exists (on /).

The way I've done it in the past is by using -r/-R to match against the
source path.  For example, to match "//server/FooBar$" I had a check_disk
check with "-r FooBar" in it.  I imagine that you might also be able to do
what you're looking to do by using -X to exclude whatever filesystem type
the / filesystem is (assuming that the mounted filesystem is a different
type, of course).  I'm sure others will have different ways of doing it too.

Good luck.
Jeffrey.

On Wed, Oct 5, 2011 at 9:52 PM, Tim Dunphy <bluethundr at jokefire.com> wrote:

> hello list!
>
>  hello.. I am running a nagios disk check that reports OK even when the
> partition is not mounted or the machine is shut down .. how can I test the
> check and adjust it so that it reports accurately?
>
>
> ## Machine info
>
> CentOS release 5.6 (Final)
> i686
>
> ##Nagios Version
>
> Nagios Core 3.3.1
>
> ## Command definition
>
> define command{
>        command_name    check_store_disk
>        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
>        }
>
>
> ## Service definition
>
> define service{
>        use                             local-service         ; Name of
> service template to use
>        #host_name                       localhost
>        hostgroup_name                  web-servers
>        service_description             Store Partition
>        check_command                   check_store_disk!20%!10%!/
>        }
>
> The disk is mounted:
>
> [root at VIRTCENT11:~] #df -h
> nas2:/mnt/store
>                      1.4T  370G  876G  30% /mnt/store
>
> [root at VIRTCENT11:~] #/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p
> /mnt/store
> DISK OK - free space: /mnt/store 896088 MB (70% inode=99%);|
> /mnt/store=378829MB;1108624;1247202;0;1385780
>
> In this case the check is accurate...the disk is mounted
>
> Now I unmount the partition:
>
> [root at VIRTCENT11:~] #umount /mnt/store
>
> I verify that the partition is not mounted with df and then run the check
> again:
>
> [root at VIRTCENT11:~] #/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p
> /mnt/store
> DISK OK - free space: / 5737 MB (68% inode=96%);| /=2581MB;7017;7894;0;8772
>
> But the check still thinks the disk is ok.
>
> How can I best address this problem?
>
> Thank you,
> Tim
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20111006/d2fff652/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list