Actions Component

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hornseym
Posts: 13
Joined: Wed Nov 16, 2016 6:21 am

Actions Component

Post by hornseym »

I currently have the Actions Component setup to add a custom command (i.e. the Action Type is set to command) to every service within a service group when certain conditions are met. This works.

However, when I click on the command it opens a brand new tab, telling me its executing the script. This is not ideal.

Does this behavior always happen with commands? Is there any way to get it to stop opening up this new tab and displaying this extra information (some of which could be considered a security risk as its potentially giving extra information about the system)?

Many thanks,

Matthew
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Actions Component

Post by mcapra »

hornseym wrote: Does this behavior always happen with commands?
Yup! The popup is pretty important in helping (older versions of) PHP not get hung up on a particular process.
hornseym wrote: Is there any way to get it to stop opening up this new tab and displaying this extra information?
Not with the component's current state. If you were feeling adventurous, you could change the following in /usr/local/nagiosxi/html/includes/components/actions/runcmd.php around line 125:

Code: Select all

system($cmdline);
To use exec instead:

Code: Select all

exec($cmdline);
It's worth mentioning that changes like this aren't strictly supported though.
Former Nagios employee
https://www.mcapra.com/
Locked