Page 1 of 1

Event Handler: Run Remote Commands in Windows

Posted: Mon Jun 08, 2020 10:23 am
by FCC_Nagios_Support
Good evening:

I am trying to start a service when Nagios notify it with the eventhandler.
I would like to call a remote command from unix Nagios to Windows.
I tried:
[root@a2nagio001p ~]# /usr/bin/winexe -U FCC/adminovo%Temporal04 //10.5.0.143 dir
[winexe/winexe.c:120:on_ctrl_pipe_error()] ERROR: Failed to install service winexesvc - NT code 0x00000424

Any one nows what is missing or required.


Thanks

Re: Event Handler: Run Remote Commands in Windows

Posted: Mon Jun 08, 2020 11:50 am
by FCC_Nagios_Support
Hello I got it!
The remote service was needed.
My next doubt is I have checkers with a list of services and I do not know how to parse with EventHandler and trigger the exact service to start.
Thanks

Re: Event Handler: Run Remote Commands in Windows

Posted: Mon Jun 08, 2020 4:35 pm
by cdienger
"net start" can be used on a Windows machine to get a list of services. You can use the net command to stop/start them as well - https://www.windows-commandline.com/sta ... mand-line/.

Re: Event Handler: Run Remote Commands in Windows

Posted: Tue Jun 09, 2020 9:43 am
by FCC_Nagios_Support
Many Thanks Sir.

Re: Event Handler: Run Remote Commands in Windows

Posted: Tue Jun 09, 2020 9:48 am
by scottwilkerson
FCC_Nagios_Support wrote:Many Thanks Sir.
No problem

Locking thread