Hi
I am interested to remove "Disable active check of this host/service" from host commands right menu.
Please advise how can I do that ?
Remove "Disable active check of this host/service" from menu
Re: Remove "Disable active check of this host/service" from
The only way you can do that is to modify the source code and recompile it.
*** Note: This will get reverted if you upgrade and will need to be reimplemented.
*** Make sure that you have known-good backups/vm snapshots before making any modifications
Let's use Core 4.1.1 as an example.
Edit this file:
Delete this code (around line 1109):
Then:
That should do it.
*** Note: This will get reverted if you upgrade and will need to be reimplemented.
*** Make sure that you have known-good backups/vm snapshots before making any modifications
Let's use Core 4.1.1 as an example.
Code: Select all
cd /tmp
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.1.1.tar.gz
tar zxf nagios-4.1.1.tar.gz
cd nagios-4.1.1Code: Select all
/tmp/nagios-4.1.1/cgi/extinfo.cCode: Select all
if(temp_hoststatus->checks_enabled == TRUE) {
printf("<tr CLASS='command'><td><img src='%s%s' border=0 ALT='Disable Active Checks Of This Host' TITLE='Disable Active Checks Of This Host'></td><td CLASS='command'><a href='%s?cmd_typ=%d&host=%s'>Disable active checks of this host</a></td></tr>\n", url_images_path, DISABLED_ICON, COMMAND_CGI, CMD_DISABLE_HOST_CHECK, url_encode(host_name));
}
else
printf("<tr CLASS='command'><td><img src='%s%s' border=0 ALT='Enable Active Checks Of This Host' TITLE='Enable Active Checks Of This Host'></td><td CLASS='command'><a href='%s?cmd_typ=%d&host=%s'>Enable active checks of this host</a></td></tr>\n", url_images_path, ENABLED_ICON, COMMAND_CGI, CMD_ENABLE_HOST_CHECK, url_encode(host_name));
printf("<tr CLASS='data'><td><img src='%s%s' border=0 ALT='Re-schedule Next Host Check' TITLE='Re-schedule Next Host Check'></td><td CLASS='command'><a href='%s?cmd_typ=%d&host=%s%s'>Re-schedule the next check of this host</a></td></tr>\n", url_images_path, DELAY_ICON, COMMAND_CGI, CMD_SCHEDULE_HOST_CHECK, url_encode(host_name), (temp_hoststatus->checks_enabled == TRUE) ? "&force_check" : "");Code: Select all
cd /tmp/nagios-4.1.1
./configure
make all
cp /tmp/nagios-4.1.1/cgi/extinfo.cgi /usr/local/nagios/sbin/extinfo.cgiRe: Remove "Disable active check of this host/service" from
Thanks for the detail procedure. Please close this thread.