> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Goodburn, Laura > Sent: Wednesday, May 31, 2006 3:25 PM > To: nagios-users@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 [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=lnk&kid7521&bid$8729&dat1642 _______________________________________________ Nagios-users mailing list Nagios-users@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