<br><font size=2 face="sans-serif">Melanie.</font>
<br>
<br><font size=2 face="sans-serif">1. When you test the script are you
testing it as the nagios user?</font>
<br><font size=2 face="sans-serif">2. Does the script reside in the libexec
folder under the nagios user's home directory?</font>
<br>
<br><font size=2 face="sans-serif">If the answer to the above questions
is yes then:</font>
<br>
<br><font size=2 face="sans-serif">define command {</font>
<br><font size=2 face="sans-serif"> command_name
check_snmp_windows_disk</font>
<br><font size=2 face="sans-serif"> command_line
$USER1$/check_snmp_storage -H $HOSTADDRESS$ -C $ARG1$ -q FixedDisk
-w $ARG2$ -c $ARG3$ -m $ARG4$ $ARG5$</font>
<br><font size=2 face="sans-serif"> }<br>
That is my command definition. $ARG5$ is an optional switch for exclusion.</font>
<br>
<br><font size=2 face="sans-serif">One of the check commands (with security
info snipped)</font>
<br>
<br><font size=2 face="sans-serif">define service {</font>
<br><font size=2 face="sans-serif"> host_name
<SNIP></font>
<br><font size=2 face="sans-serif"> service_description
SNMP - Windows - Disk - Production</font>
<br><font size=2 face="sans-serif"> is_volatile
0</font>
<br><font size=2 face="sans-serif"> check_command
check_snmp_windows_disk!<SNIP>!95!98!^C:!-e</font>
<br><font size=2 face="sans-serif"> max_check_attempts
3</font>
<br><font size=2 face="sans-serif"> normal_check_interval
120</font>
<br><font size=2 face="sans-serif"> retry_check_interval
30</font>
<br><font size=2 face="sans-serif"> active_checks_enabled
1</font>
<br><font size=2 face="sans-serif"> passive_checks_enabled
1</font>
<br><font size=2 face="sans-serif"> check_period
24x7</font>
<br><font size=2 face="sans-serif"> parallelize_check
1</font>
<br><font size=2 face="sans-serif"> obsess_over_service
1</font>
<br><font size=2 face="sans-serif"> check_freshness
0</font>
<br><font size=2 face="sans-serif"> event_handler_enabled
1</font>
<br><font size=2 face="sans-serif"> flap_detection_enabled
1</font>
<br><font size=2 face="sans-serif"> process_perf_data
1</font>
<br><font size=2 face="sans-serif"> retain_status_information
1</font>
<br><font size=2 face="sans-serif"> retain_nonstatus_information
1</font>
<br><font size=2 face="sans-serif"> contact_groups
sysalertstest</font>
<br><font size=2 face="sans-serif"> notification_interval
120</font>
<br><font size=2 face="sans-serif"> notification_period
24x7</font>
<br><font size=2 face="sans-serif"> notification_options
w,u,c,r</font>
<br><font size=2 face="sans-serif"> notifications_enabled
1</font>
<br><font size=2 face="sans-serif"> register
1</font>
<br><font size=2 face="sans-serif"> }</font>
<br>
<br><font size=2 face="sans-serif">That is the check for our production
windows servers excluding the C drive (the -e is the exclude switch).</font>
<br>
<br><font size=2 face="sans-serif">I hope this information is helpful.</font>
<br>
<br><tt><font size=2>Melanie Pfefer <melanie_pfefer@yahoo.co.uk>
wrote on 02/20/2008 07:00:30 AM:<br>
<br>
> Hello again<br>
> <br>
> I downloaded the perl script and indeed I can use it<br>
> manually:<br>
> ./check_snmp_storage.pl -H TROY -C public -m ^[CDE]:<br>
> -w 80% -c 90%<br>
> <br>
> D:\ Label: Serial Number 225e3590:<br>
> 3%used(2587MB/89495MB) C:\ Label: Serial Number<br>
> 8cfa6a13: 27%used(6644MB/25000MB) (<80%) : OK<br>
> <br>
> <br>
> <br>
> In nagios, I should define a service and a command to<br>
> start using check_snmp_storage.pl. Could you please<br>
> help in what I should add?<br>
> <br>
> Many thanks<br>
> <br>
> <br>
> --- mark.potter@academy.com wrote:<br>
> <br>
> > You will need to actually download the plugin from <br>
> > </font></tt><a href=http://nagios.manubulon.com/snmp_storage.html><tt><font size=2>http://nagios.manubulon.com/snmp_storage.html</font></tt></a><tt><font size=2>
as it<br>
> > is not part of the <br>
> > Nagios plugins package but rather a third party<br>
> > plugin.<br>
> > <br>
> > Melanie Pfefer <melanie_pfefer@yahoo.co.uk> wrote on<br>
> > 02/19/2008 03:37:04 <br>
> > PM:<br>
> > <br>
> > > Hello<br>
> > > <br>
> > > I added this:<br>
> > > <br>
> > > define command{<br>
> > > command_name check_win_storage<br>
> > > command_line <br>
> > $USER3$/check_snmp_storage.pl<br>
> > > -H $HOSTADDRESS$ -C $ARG1$ -m $ARG2$ -w $ARG3$ -c<br>
> > > $ARG4$<br>
> > > }<br>
> > > <br>
> > > <br>
> > > define service {<br>
> > > use
common-service<br>
> > > hostgroup_name
nt-servers<br>
> > > service_description
Check Windows<br>
> > drives<br>
> > > check_command <br>
> > > check_win_storage!public!^[CDE]:!80!90!<br>
> > > }<br>
> > > <br>
> > > the result was: Return code of 127 is out of<br>
> > bounds -<br>
> > > plugin may be missing<br>
> > > <br>
> > > <br>
> > > Any idea?<br>
> > > thanks<br>
> > > --- mark.potter@academy.com wrote:<br>
> > > <br>
> > > > Melanie,<br>
> > > > <br>
> > > > I have setup the plugin available here: <br>
> > > > </font></tt><a href=http://nagios.manubulon.com/snmp_storage.html><tt><font size=2>http://nagios.manubulon.com/snmp_storage.html</font></tt></a><tt><font size=2><br>
> > and it<br>
> > > > works perfectly for <br>
> > > > our needs. It uses SNMP so you would have to<br>
> > have<br>
> > > > SNMP setup on all of <br>
> > > > your Windows boxes but with that caveat it is<br>
> > the<br>
> > > > best solution I have <br>
> > > > found for monitoring windows partitions. If you<br>
> > are<br>
> > > > looking for something <br>
> > > > slightly less complicated or with fewer options<br>
> > > > there are many plugins on <br>
> > > > nagiosexchange.com that will do the job. I would<br>
> > > > recommend <br>
> > > > check_snmp_storage though due to the options and<br>
> > the<br>
> > > > robustness of the <br>
> > > > plugin.<br>
> > > > <br>
> > > > Best Regards,<br>
> > > > <br>
> > > > Mark L. Potter<br>
> > > > Systems Engineer<br>
> > > > Academy Sports & Outdoors<br>
> > > > 1800 N. Mason Rd<br>
> > > > Katy, Texas 77449<br>
> > > > <br>
> > > > <br>
> > > > <br>
> > > > Melanie Pfefer <melanie_pfefer@yahoo.co.uk><br>
> > wrote on<br>
> > > > 02/19/2008 03:04:23 <br>
> > > > AM:<br>
> > > > <br>
> > > > > Hello Mark,<br>
> > > > > I am interested in monitoring the disks even<br>
> > with<br>
> > > > no<br>
> > > > > exclusions.<br>
> > > > > I installed nagios2.9 and the nagios plugin on<br>
> > a<br>
> > > > linux<br>
> > > > > box.<br>
> > > > > <br>
> > > > > Would it be possible that you give me what<br>
> > you?ve<br>
> > > > done<br>
> > > > > to monitor the partitions on windows?<br>
> > > > > <br>
> > > > > I appreciate your help.<br>
> > > > > <br>
> > > > > --- mark.potter@academy.com wrote:<br>
> > > > > <br>
> > > > > > nagios-users-bounces@lists.sourceforge.net<br>
> > wrote<br>
> > > > on<br>
> > > > > > 02/18/2008 11:22:05 <br>
> > > > > > AM:<br>
> > > > > > <br>
> > > > > > > mark.potter@academy.com schrieb:<br>
> > > > > > > > We are using snmp to monitor our
windows<br>
> > > > servers<br>
> > > > > > and I have had a <br>
> > > > > > request <br>
> > > > > > > > from the windows admins. They want
to<br>
> > alert<br>
> > > > at<br>
> > > > > > 80% and 90% usage on <br>
> > > > > > C:\ <br>
> > > > > > > > but 95% and 98% on all other partitions.<br>
> > (I<br>
> > > > > > didn't ask about the logic <br>
> > > > > > <br>
> > > > > > > > because it wouldn't matter). I
have<br>
> > tried<br>
> > > > > > multiple snmp plugins and <br>
> > > > > > all of <br>
> > > > > > > > them seem to act the same. I can
monitor<br>
> > all<br>
> > > > the<br>
> > > > > > disks on a single <br>
> > > > > > check, <br>
> > > > > > > > a single disk on a single check
but I<br>
> > cannot<br>
> > > > > > monitor all the disks <br>
> > > > > > except <br>
> > > > > > > > C: on a single check. There doesn't
seem<br>
> > to<br>
> > > > be<br>
> > > > > > any plugins out there <br>
> > > > > > that <br>
> > > > > > > > allow exclusion and use snmp. Before
I<br>
> > go<br>
> > > > > > writing a wrapper for an <br>
> > > > > > > > existing plugin does anyone know
if<br>
> > there is<br>
> > > > a<br>
> > > > > > plugin that will allow <br>
> > > > > > me <br>
> > > > > > > > to do this? I am looking to exclude
a<br>
> > single<br>
> > > > > > drive letter but check <br>
> > > > > > all <br>
> > > > > > > > the rest of the drives via snmp
on<br>
> > windows<br>
> > > > > > servers. Thanks in advance <br>
> > > > > > for <br>
> > > > > > > > any advice.<br>
> > > > > > > > <br>
> > > > > > > <br>
> > > > > > ><br>
> > </font></tt><a href=http://nagios.manubulon.com/snmp_storage.html><tt><font size=2>http://nagios.manubulon.com/snmp_storage.html</font></tt></a><tt><font size=2><br>
> > > > > > > <br>
> > > > > > > <br>
> > > > > > > check_snmp_storage will do the Job<br>
> > > > > > > <br>
> > > > > > > Joerg<br>
> > > > > > That does exactly what we need. Is it listed<br>
> > on<br>
> > > > > > Nagios Exchange? Thank you <br>
> > > > > > for your response; I have managed to escape<br>
> > > > writing<br>
> > > > > > a wrapper thanks to <br>
> > > > > > you!<br>
> > > > > > ><br>
> > > > > <br>
> > > ><br>
> > > <br>
> ><br>
> -------------------------------------------------------------------------<br>
> > > > > > This SF.net email is sponsored by: Microsoft<br>
> > > > > > Defy all challenges. Microsoft(R) Visual<br>
> > Studio<br>
> > > > > > 2008.<br>
> > > > > ><br>
> > > > ><br>
> > > ><br>
> > ><br>
> ><br>
> </font></tt><a href=http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/><tt><font size=2>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</font></tt></a><tt><font size=2>><br>
> > > > ><br>
> > _______________________________________________<br>
> > > > > > Nagios-users mailing list<br>
> > > > > > Nagios-users@lists.sourceforge.net<br>
> > > > > ><br>
> > > > ><br>
> > > ><br>
> > ><br>
> ><br>
> </font></tt><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users"><tt><font size=2>https://lists.sourceforge.net/lists/listinfo/nagios-users</font></tt></a><tt><font size=2><br>
> > > > > > ::: Please include Nagios version, plugin<br>
> > > > version<br>
> > > > > > (-v) and OS when reporting any issue. <br>
> > > > > > ::: Messages without supporting info will<br>
> > risk<br>
> > > > being<br>
> > > > > > sent to /dev/null<br>
> > > > > <br>
> > <br>
> === message truncated ===<br>
> <br>
> <br>
> <br>
> __________________________________________________________<br>
> Sent from Yahoo! Mail - a smarter inbox </font></tt><a href=http://uk.mail.yahoo.com/><tt><font size=2>http://uk.mail.yahoo.com</font></tt></a><tt><font size=2><br>
> <br>
</font></tt>