(No output returned from plugin)

Anthony Montibello amontibello at gmail.com
Tue Sep 30 01:01:46 CEST 2008


Most plugins (including NSCA,NRPE, NSClient++, NC_Net ) that allow input
form scripts require output from Standard Out.
to do this with a 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)

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)


Tony (Author of NC_NEt)

On Mon, Sep 29, 2008 at 12:03 PM, Matt Rivet <matt.rivet at secure-24.com>wrote:

> There is only one line of output.
>
> Also here is a sample of the VBS script:
>
> if (numOfFiles < cint(COUNT_THRESHOLD_WARN)) then
>        wscript.echo numOfFiles & " Ok"
>        wscript.quit(0)
>
>    elseif numOfFiles < cint(COUNT_THRESHOLD_CRIT) and numOfFiles >
> cint(COUNT_THRESHOLD_WARN) then
>        wscript.echo numOfFiles & " Warning"
>        wscript.quit(1)
>
> Thank you
>
> -----Original Message-----
> From: Jon Angliss [mailto:jon at netdork.net]
> Sent: Friday, September 26, 2008 8:08 PM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] (No output returned from plugin)
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Fri, 26 Sep 2008 14:02:17 -0400, "Matt Rivet" <matt.rivet at secure-
> 24.com> wrote:
>
> >Hi,
>
> >I am running nagios 2.5 and monitoring a windows 2003 server using
> >NSclient++ 0.2.7.  I have wrote a VBS script and defined it in NSC.ini
> >as
>
> >[NRPE]
>
> >checkIMMailDropFileCountNagios= "cscript //NoLogo
> >c:\nsclientpp\scripts\IMMailDrop_FileCount_Nagios.vbs"
>
> >The script takes a value, compares it and then quits exit status 0 for
> >OK and echo's its value.  The nagios command I am running to perform
> >this check is
>
> >'[root at nagios1 ~]# ./check_nrpe -H $HOSTNAME -c
> >checkIMMailDropFileCountNagios' this command will print  "19 OK" on
> >stdout.  If the command can print the value on stdout why doesn't
> nagios
> >recognize it?
>
> >Do I need to specify some type of argument in NSC.ini?
>
> Are you sure there isn't an extra line break, or something like that
> appearing at the beginning of the echo?  Have you tried sending it to
> a file, and seeing what the output really looks like?
>
> ./check_nrpe -H $HOSTNAME$ -c checkIMMailDropFileCountNagios > \
>    /tmp/test.txt
>
> You should get the "19 OK" on the top line if there isn't anything
> unusual in the output.  I'm also not sure on how nrpe/nagios handles
> the difference in line endings.  I'm not sure if cscript will return
> an echo with \r\n, and not just \n like linux is used to.
>
> - --
> Jon Angliss
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32) - GPGshell v3.64
>
> iEYEARECAAYFAkjdeVsACgkQK4PoFPj9H3NEuQCcDxLL3IGGwMYJ79DfUuGmMomx
> uioAn1kjIz+kaNXoomnfzoEZcvEkFRj8
> =bdqW
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------------
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080929/f9ca4c52/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list