Event Handler not getting executed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Event Handler not getting executed

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Event Handler not getting executed

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: Event Handler not getting executed

Post 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'
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Event Handler not getting executed

Post by scottwilkerson »

Then as long as you have check_ncpa.py on the workers and they can access NCPA you should be good.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: Event Handler not getting executed

Post by Sampath.Basireddy »

With what permissions does nagios execute the script which is used in the event handler on Windows Server?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Event Handler not getting executed

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: Event Handler not getting executed

Post by Sampath.Basireddy »

Thank You Scott. This helps.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Event Handler not getting executed

Post by scottwilkerson »

Let us know if you need any further assistance
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked