SSH and Windows

Goodburn, Laura lmgoodbu at email.uncc.edu
Thu Jun 1 14:35:51 CEST 2006


Marc,

Thanks. Yes, if I type:
ssh testserver "cscript //nologo c:\nrpe_nt\check_cpu.vbs -H testserver
-w 80 -c 90"

I get the following:
OK - Total CPU Utilization 5% | 'CPU_Utilization'=5%;80%;90%;;

I will try to see if I can figure out more from the link you sent.

Laura

Laura Goodburn
SMC Manager
Information and Technology Services
The University of North Carolina at Charlotte
9201 University City Boulevard
Charlotte, NC 28223
Phone (704) 687-8988
lmgoodbu at uncc.edu
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Marc
Powell
Sent: Wednesday, May 31, 2006 10:26 PM
To: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] SSH and Windows



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Goodburn, Laura
> Sent: Wednesday, May 31, 2006 3:25 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] SSH and Windows
> 
> Please forgive me as I am fairly new to Nagios and the world of
plugins.
> 
> 
> 
> I have a Windows box that is running ssh and I would like to connect
via
> ssh, run a wmi vbs script, and pass the result back to Nagios. I know
that
> I can call the check_by_ssh plugin and pass the script name for the
> command parameter but I don't know how to pass the result back to the
> check_by_ssh plugin.
> 
> 
> 
> When I ssh into the box and run the .vbs script for CPU by executing
the
> following command:
> 
> cscript //nologo c:\nrpe_nt\check_cpu.vbs -H testserver -w 80 -c 90
> 
> 
> 
> I get the following:
> 
> OK - Total CPU Utilization 2% | 'CPU_Utilization'=2%;80%;90%;;
> 
> 
> 
> However, if I try the following command:
> 
> ./libexec/check_by_ssh -H testserver -C "cscript //nologo
> c:\nrpe_nt\check_cpu.vbs -H testserver -w 80 -c 90"
> 
> 
> 
> I get nothing returned, the prompt just comes back like it ran the
script
> but returned no result.
> 
> 
> 
> Has anyone else ever written a custom plugin to pull the result back
in
> via ssh? For security concerns and traffic control, I would prefer to
use
> ssh instead of nrpe for running wmi scripts. Especially since we are
> trying to make it so that the wmi scripts will only report the
statistics
> for that box instead of branching out to other Windows boxes on the
> subnet.
> 
> 
> 
> Any help would be greatly appreciated.

As long as your plugin complies with the Screen Output and Plugin Return
Codes (at the minimum) of
http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN73,
check-by-ssh should pass the appropriate information back.

Can you run your command directly from ssh? i.e. ssh user at hostname
"cscript //nologo c:\nrpe_nt\check_cpu.vbs -H testserver -w 80 -c 90"

--
marc


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=k&kid7521&bid$8729&dat1642
_______________________________________________
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


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
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