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 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Powell Sent: Wednesday, May 31, 2006 10:26 PM To: [email protected] Subject: RE: [Nagios-users] SSH and Windows > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Goodburn, Laura > Sent: Wednesday, May 31, 2006 3:25 PM > To: [email protected] > 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 [EMAIL PROTECTED] "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 [email protected] 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 [email protected] 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
