Page 1 of 1

custom Host Commands

Posted: Tue Mar 27, 2018 3:55 pm
by lumirl
Hello,
is there a way how to add a custom command to the webinterface under the host commands?
There is locate host on the map, Disable active checks of this host etc. I need to add there a command.
I have it defined as a bash command and it works fine as event handler - its actually rebooting a machine through an resetter.
I would like to reset the machine via this webinterface.
Any ideas?
Thanks,
Lumir

Re: custom Host Commands

Posted: Wed Mar 28, 2018 9:11 am
by scottwilkerson
lumirl wrote:Hello,
is there a way how to add a custom command to the webinterface under the host commands?
There is locate host on the map, Disable active checks of this host etc. I need to add there a command.
I have it defined as a bash command and it works fine as event handler - its actually rebooting a machine through an resetter.
I would like to reset the machine via this webinterface.
Any ideas?
Thanks,
Lumir
No, this is not available through the WebUI, only through adding the command to a configuration file.

This is available in the Web UI of Nagios XI

Re: custom Host Commands

Posted: Wed Mar 28, 2018 2:20 pm
by lumirl
Maybe I can edit source files. What component is calling scripts in libexec or defined commands?
This is the only feature Im missing. for now... :)

Re: custom Host Commands

Posted: Wed Mar 28, 2018 2:49 pm
by scottwilkerson
That is the job of the Nagios Core engine.
https://github.com/NagiosEnterprises/nagioscore

But it is the cfg files that specify what commands are run