Page 1 of 1

Actions Component

Posted: Fri Jan 13, 2017 6:44 am
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

Re: Actions Component

Posted: Fri Jan 13, 2017 12:05 pm
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.