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 /).<br>
<br>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.<br>
<br>Good luck.<br>Jeffrey.<br><br><div class="gmail_quote">On Wed, Oct 5, 2011 at 9:52 PM, Tim Dunphy <span dir="ltr"><<a href="mailto:bluethundr@jokefire.com">bluethundr@jokefire.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
hello list!<br>
<br>
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?<br>
<br>
<br>
## Machine info<br>
<br>
CentOS release 5.6 (Final)<br>
i686<br>
<br>
##Nagios Version<br>
<br>
Nagios Core 3.3.1<br>
<br>
## Command definition<br>
<br>
define command{<br>
command_name check_store_disk<br>
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$<br>
}<br>
<br>
<br>
## Service definition<br>
<br>
define service{<br>
use local-service ; Name of service template to use<br>
#host_name localhost<br>
hostgroup_name web-servers<br>
service_description Store Partition<br>
check_command check_store_disk!20%!10%!/<br>
}<br>
<br>
The disk is mounted:<br>
<br>
[root@VIRTCENT11:~] #df -h<br>
nas2:/mnt/store<br>
1.4T 370G 876G 30% /mnt/store<br>
<br>
[root@VIRTCENT11:~] #/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /mnt/store<br>
DISK OK - free space: /mnt/store 896088 MB (70% inode=99%);| /mnt/store=378829MB;1108624;1247202;0;1385780<br>
<br>
In this case the check is accurate...the disk is mounted<br>
<br>
Now I unmount the partition:<br>
<br>
[root@VIRTCENT11:~] #umount /mnt/store<br>
<br>
I verify that the partition is not mounted with df and then run the check again:<br>
<br>
[root@VIRTCENT11:~] #/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /mnt/store<br>
DISK OK - free space: / 5737 MB (68% inode=96%);| /=2581MB;7017;7894;0;8772<br>
<br>
But the check still thinks the disk is ok.<br>
<br>
How can I best address this problem?<br>
<br>
Thank you,<br>
Tim<br>
<br>
<br>
------------------------------------------------------------------------------<br>
All the data continuously generated in your IT infrastructure contains a<br>
definitive record of customers, application performance, security<br>
threats, fraudulent activity and more. Splunk takes this data and makes<br>
sense of it. Business sense. IT sense. Common sense.<br>
<a href="http://p.sf.net/sfu/splunk-d2dcopy1" target="_blank">http://p.sf.net/sfu/splunk-d2dcopy1</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</blockquote></div><br>