<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Monitor Disk Drive</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Courier New";
color:navy;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>Martyn,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>Running Nagios
3.01 - This is how I monitor different disk drives on windows machines, using
NSClient++.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>Example C and F:
drives:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>I define a command(s)
in commands.cfg, like this:<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy;font-weight:bold'># Define command for disk space on C: ---#<o:p></o:p></span></font></b></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>define command{<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>command_name check_diskc<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v
$ARG1$ $ARG2$ -s $USER7$<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'> }<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy;font-weight:bold'># Define command for disk space on F: ---#<o:p></o:p></span></font></b></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>define command{<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>command_name check_diskf<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v
$ARG1$ $ARG2$ -s $USER7$<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'> }<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>In services.cfg I define
the checks:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy;font-weight:bold'># Monitoring Disk Usage C:\<o:p></o:p></span></font></b></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>define service {<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>use generic-service<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>host_name
hostname<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>service_description Disk-C<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>servicegroups disks<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>action_url
nagiosserver/nagios/cgi-bin/extinfo.cgi?type=2&host=$HOSTNAME$&service=Disk-C<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>check_command check_diskc!USEDDISKSPACE!-l
c -w 95 -c 98<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'> }<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy;font-weight:bold'># Monitoring Disk Usage F:\<o:p></o:p></span></font></b></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 color=navy
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>define service {<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>use generic-service<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>host_name hostname<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>service_description Disk-F<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>servicegroups disks<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>action_url
nagiosserver/nagios/cgi-bin/extinfo.cgi?type=2&host=$HOSTNAME$&service=Disk-F<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>check_command check_diskf!USEDDISKSPACE!-l
c -w 95 -c 98<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
color=navy face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
color:navy'>}<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>Hope that helps!<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>Thanks,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>PJ<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Martyn
[mailto:martyn@chetnet.co.uk] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, February 02, 2009
9:13 AM<br>
<b><span style='font-weight:bold'>To:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Nagios-users] Monitor
Disk Drive</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>How
do I monitor another disk drive other that c:\</span></font> <o:p></o:p></p>
<p><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New"'>Below is the script to monitor the C:\ drive so I
assumed I changed the c to a f which is my other drive but Nagios will not
restart.</span></font><o:p></o:p></p>
<p><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New"'>define service{</span></font> <br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>use
generic-service</span></font> <br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>host_name
winserver</span></font> <br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>service_description C:\ Drive Space</span></font>
<br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>check_command
check_nt!USEDDISKSPACE!-l<b><span
style='font-weight:bold'> c</span></b> -w 80 -c 90</span></font> <br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>}</span></font><span lang=EN-GB> </span><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New"'>define service{</span></font> <br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>use
generic-service</span></font> <br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>host_name
winserver</span></font> <br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>service_description F:\ Drive Space</span></font>
<br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>check_command
check_nt!USEDDISKSPACE!-l</span></font><b><span
lang=EN-GB style='font-weight:bold'> </span></b><b><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
font-weight:bold'>f</span></font></b><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> -w 80 -c 90</span></font>
<br>
<span lang=EN-GB> </span><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'>}</span></font><span lang=EN-GB> </span><o:p></o:p></p>
<p><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New"'>Thanks</span></font><span lang=EN-GB> </span><o:p></o:p></p>
<p><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New"'>Martyn</span></font><span lang=EN-GB> </span><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</div>
</body>
</html>