Page 1 of 1

Invoke command on Nagios server from Windows client

Posted: Tue Feb 04, 2014 3:45 pm
by gurkakrieg
Hi,

I'm sure there's an easy way to do this, but I seem to have made things difficult for myself. I am running Nagios XI trial on an EC2 Centos instance and monitoring Windows EC2 instances using nsclient++. As part of our autoscaling project, I want to add/remove host and service configs for autoscaled EC2 instances (for a webserver farm). I've got a handle on everything except, what is the best way to tell the Nagios server to launch the automated host management shell scripts?

I've considered adding plink to the Windows servers and using powershell to submit ssh-wrapped commands to the Nagios server, but I'd like to avoid having to install plink (or putty) and register the public key on the EC2.

Is there a way to use a passive check to send the script to run (and necessary parameters) as an nsclient++ call? Or something along those lines?

Re: Invoke command on Nagios server from Windows client

Posted: Tue Feb 04, 2014 5:22 pm
by abrist
You could use winrpe to fire off the scripts from windows, but that comes with a lot of heavy stuff (cygwin, etc). putty/plink might be the only lightweight options for initiating the script from the windows host. Maybe someone on this board has a better idea.

Re: Invoke command on Nagios server from Windows client

Posted: Tue Feb 04, 2014 9:10 pm
by gurkakrieg
Ok, thanks. The SSH route is fine by me -- I just wanted to verify there wasn't a more elegant, Nagios-y solution.

Re: Invoke command on Nagios server from Windows client

Posted: Wed Feb 05, 2014 10:22 am
by slansing
Unfortunately not at this time, we discussed a number of possibilities and this is the top one. SSH should be quite quick and snappy though!