<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.5762.3">
<TITLE>check_disk_smb problem</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Greetings.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I've been playing with the NetSaint 1.2.9-4 check_disk_smb plugin today.  I noticed the following errant behavior in the WARNING and CRITICAL notifications.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">* If I specify a percentage, the plugin appears to work as designed.  As soon as I cross the warning threshold percent specified on the commandline, I receive the warning notification, and as soon as I cross the critical threshold percent, I receive the critical threshold notification.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">* If I use the M(byte) or G(byte) for warning/critical thresholds, I never receive a warning -- I go straight to critical no matter what the warning threshold is set to.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I made some quick modifications to the check_disk_smb plugin to verify my suspicions, since I didn't know any other way to display whether I was exiting the script with a warning or critical state.  Watch what happens here (username and password sanitized):</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Using the default values of warning at 85% and critical at 95% I receive this output:</FONT>

<BR><FONT SIZE=2 FACE="Arial">[root@SLNetSaint plugins-scripts]# check_disk_smb 172.16.2.36 log -u <username> -p <password></FONT>

<BR><FONT SIZE=2 FACE="Arial">Disk ok - 3.3G (29%) free on </FONT><A HREF="file://\\172.16.2.36\log"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">\\172.16.2.36\log</FONT></U></A>
</P>

<P><FONT SIZE=2 FACE="Arial">Using the thresholds where I want them, at 70% warning and 90% critical, I receive the following:</FONT>

<BR><FONT SIZE=2 FACE="Arial">[root@SLNetSaint plugins-scripts]# check_disk_smb 172.16.2.36 log -u <username> -p <password> -w70 -c90 </FONT>

<BR><FONT SIZE=2 FACE="Arial">WARNING -- Only 3.3G (29%) free on </FONT><A HREF="file://\\172.16.2.36\log"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">\\172.16.2.36\log</FONT></U></A>
</P>

<P><FONT SIZE=2 FACE="Arial">Using a threshold for warning at 3500M and critical at 1000M, I get the following:</FONT>

<BR><FONT SIZE=2 FACE="Arial">[root@SLNetSaint plugins-scripts]# check_disk_smb 172.16.2.36 log -u <username> -p <password> -w3500M -c1000M  </FONT>

<BR><FONT SIZE=2 FACE="Arial">CRITICAL -- Only 3.3G (29%) free on </FONT><A HREF="file://\\172.16.2.36\log"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">\\172.16.2.36\log</FONT></U></A>
</P>

<P><FONT SIZE=2 FACE="Arial">Same result if I use 3G and 1G instead of 3500M and 1000M:</FONT>

<BR><FONT SIZE=2 FACE="Arial">[root@SLNetSaint plugins-scripts]# check_disk_smb 172.16.2.36 log -u <username> -p <password> -w3G -c1G  </FONT>

<BR><FONT SIZE=2 FACE="Arial">CRITICAL -- Only 3.3G (29%) free on </FONT><A HREF="file://\\172.16.2.36\log"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">\\172.16.2.36\log</FONT></U></A>
</P>

<P><FONT SIZE=2 FACE="Arial">But even more interesting, even if I specify 2G and 1G for warning/critical thresholds respectively, I receive:</FONT>

<BR><FONT SIZE=2 FACE="Arial">[root@SLNetSaint plugins-scripts]# check_disk_smb 172.16.2.36 log -u <username> -p <password> -w2G -c1G  </FONT>

<BR><FONT SIZE=2 FACE="Arial">CRITICAL -- Only 3.3G (29%) free on </FONT><A HREF="file://\\172.16.2.36\log"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">\\172.16.2.36\log</FONT></U></A>
</P>

<P><FONT SIZE=2 FACE="Arial">I checked the Nagios v1.3 check_disk_smb plugin and it appears that some of the perl was cleaned up, but the logic is largely the same as the NetSaint 1.2.9-4 plugin.  If I had any idea where to start with this I would, but I'm not familiar enough with CVS or perl to feel comfortable hacking the logic on this one. </FONT></P>

<P><FONT SIZE=2 FACE="Arial">In addition, I'd like to suggest two items for check_disk_smb: </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">1) I think that check_disk_smb *should* also report WARNING -- or CRITICAL -- like the modifications I made above so that it's easier to troubleshoot warning/critical threshold problems.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">2) check_disk_smb currently does not support checking administrative or hidden shares on servers such as c$, d$, e$, etc… While I don't want to create a domain admin user just to allow NetSaint/Nagios to check drive space, it would be quite handy to be able to specify a hidden share such as log$ in the example above so users wouldn't be able to see shares they should not have access to.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Thanks!</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=1 FACE="Trebuchet MS">J. Casalino</FONT>

<BR><FONT COLOR="#0000FF" SIZE=1 FACE="Trebuchet MS">Sr. Network Administrator, Fairbanks Capital Corp.</FONT>

<BR><FONT COLOR="#0000FF" SIZE=1 FACE="Trebuchet MS">josephc@fairbankscapital.com</FONT>
</P>

</BODY>
</HTML>