<div dir="ltr"><div><font face="Arial"><font color="#0000ff"><font size="2"><span class="828224323-24092008">Most plugins (including NSCA,NRPE, NSClient++, NC_Net ) that allow input form scripts require output from Standard Out.</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="828224323-24092008">to do this with a </span></font></font></font><font face="Arial"><font color="#0000ff"><font size="2"><span class="828224323-24092008">VB script, the script must be done via CSCript.exe otherwise the script opens an pop up for the output. (I can see from above you did call CScript)</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="828224323-24092008"></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="828224323-24092008">Have you tested the script via a command window to validate the output is going to the command window? I thought CScript uses the //B to redirect output to console? (I do not use VB Scripts frequently)</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="828224323-24092008"></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="828224323-24092008"></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="828224323-24092008">Tony (Author of NC_NEt)</span></font></font></font></div>
<div><br></div>
<div class="gmail_quote">On Mon, Sep 29, 2008 at 12:03 PM, Matt Rivet <span dir="ltr"><<a href="mailto:matt.rivet@secure-24.com">matt.rivet@secure-24.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">There is only one line of output.<br><br>Also here is a sample of the VBS script:<br><br>if (numOfFiles < cint(COUNT_THRESHOLD_WARN)) then<br>
wscript.echo numOfFiles & " Ok"<br> wscript.quit(0)<br><br> elseif numOfFiles < cint(COUNT_THRESHOLD_CRIT) and numOfFiles ><br>cint(COUNT_THRESHOLD_WARN) then<br> wscript.echo numOfFiles & " Warning"<br>
wscript.quit(1)<br><br>Thank you<br>
<div>
<div></div>
<div class="Wj3C7c"><br>-----Original Message-----<br>From: Jon Angliss [mailto:<a href="mailto:jon@netdork.net">jon@netdork.net</a>]<br>Sent: Friday, September 26, 2008 8:08 PM<br>To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
Subject: Re: [Nagios-users] (No output returned from plugin)<br><br>-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>On Fri, 26 Sep 2008 14:02:17 -0400, "Matt Rivet" <matt.rivet@secure-<br><a href="http://24.com/" target="_blank">24.com</a>> wrote:<br>
<br>>Hi,<br><br>>I am running nagios 2.5 and monitoring a windows 2003 server using<br>>NSclient++ <a href="http://0.2.7./" target="_blank">0.2.7.</a> I have wrote a VBS script and defined it in NSC.ini<br>>as<br>
<br>>[NRPE]<br><br>>checkIMMailDropFileCountNagios= "cscript //NoLogo<br>>c:\nsclientpp\scripts\IMMailDrop_FileCount_Nagios.vbs"<br><br>>The script takes a value, compares it and then quits exit status 0 for<br>
>OK and echo's its value. The nagios command I am running to perform<br>>this check is<br><br>>'[root@nagios1 ~]# ./check_nrpe -H $HOSTNAME -c<br>>checkIMMailDropFileCountNagios' this command will print "19 OK" on<br>
>stdout. If the command can print the value on stdout why doesn't<br>nagios<br>>recognize it?<br><br>>Do I need to specify some type of argument in NSC.ini?<br><br>Are you sure there isn't an extra line break, or something like that<br>
appearing at the beginning of the echo? Have you tried sending it to<br>a file, and seeing what the output really looks like?<br><br>./check_nrpe -H $HOSTNAME$ -c checkIMMailDropFileCountNagios > \<br> /tmp/test.txt<br>
<br>You should get the "19 OK" on the top line if there isn't anything<br>unusual in the output. I'm also not sure on how nrpe/nagios handles<br>the difference in line endings. I'm not sure if cscript will return<br>
an echo with \r\n, and not just \n like linux is used to.<br><br>- --<br>Jon Angliss<br><br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.9 (MingW32) - GPGshell v3.64<br><br>iEYEARECAAYFAkjdeVsACgkQK4PoFPj9H3NEuQCcDxLL3IGGwMYJ79DfUuGmMomx<br>
uioAn1kjIz+kaNXoomnfzoEZcvEkFRj8<br>=bdqW<br>-----END PGP SIGNATURE-----<br><br><br>------------------------------------------------------------------------<br>-<br>This SF.Net email is sponsored by the Moblin Your Move Developer's<br>
challenge<br>Build the coolest Linux based applications with Moblin SDK & win great<br>prizes<br>Grand prize is a trip for two to an Open Source event anywhere in the<br>world<br><a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</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<br>reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<br><br>-------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>Build the coolest Linux based applications with Moblin SDK & win great prizes<br>Grand prize is a trip for two to an Open Source event anywhere in the world<br>
<a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</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></div></div></blockquote></div><br></div>