Page 1 of 1

Event Handler not getting executed

Posted: Wed Apr 18, 2018 9:57 am
by Sampath.Basireddy
I have recently configured event handler to execute a script to restart couple of IIS Application Pools and Reset IIS.

This is on Windows Servers.

Are there any additional steps required when we have Gearman Pollers ?

Thank You.

Re: Event Handler not getting executed

Posted: Wed Apr 18, 2018 10:06 am
by scottwilkerson
How does the event handler access the Windows Servers? The gearman pollers would also need the same access anf they would need the event handler script that is being executed on them as well as any dependencies it needs.

Re: Event Handler not getting executed

Posted: Wed Apr 18, 2018 10:51 am
by Sampath.Basireddy
The script is residing locally on the windows server. I have a command in which the script is called and that command is selected in the Event Handler..

Code: Select all

$USER1$/check_ncpa.py -H $HOSTADDRESS$ -t token -M 'plugins/script.ps1'

Re: Event Handler not getting executed

Posted: Wed Apr 18, 2018 11:04 am
by scottwilkerson
Then as long as you have check_ncpa.py on the workers and they can access NCPA you should be good.

Re: Event Handler not getting executed

Posted: Mon Apr 23, 2018 9:54 am
by Sampath.Basireddy
With what permissions does nagios execute the script which is used in the event handler on Windows Server?

Re: Event Handler not getting executed

Posted: Mon Apr 23, 2018 11:13 am
by scottwilkerson
By default the NCPA services on windows run as SYSTEM but you could modify these by changing the setting in the services in Windows.

Just note the services will require a certain level of access to perform normal monitoring.

Re: Event Handler not getting executed

Posted: Mon Apr 23, 2018 4:13 pm
by Sampath.Basireddy
Thank You Scott. This helps.

Re: Event Handler not getting executed

Posted: Mon Apr 23, 2018 5:00 pm
by scottwilkerson
Let us know if you need any further assistance