Page 1 of 1
How do I remove an item from the Home menu
Posted: Thu Feb 04, 2016 1:43 pm
by SteveBeauchemin
I would like to make an item go away from the home menu under Maps.
The Network Status Map causes web browser to hang, and starts my Nagios host CPU load to rise dramatically.
Then the user kills the browser page that is not responding, and tries again.
After a few attempts, and a dozen orphaned statusmap processes, the Nagios XI CPU load goes from a normal state of about 5 to well over 30, and the system starts to slow down.
So, how can I remove that from my home menu?
Thanks
Steve B
Re: How do I remove an item from the Home menu
Posted: Thu Feb 04, 2016 5:55 pm
by tmcdonald
I was not able to remove it, but I could disable it basically.
/usr/local/nagiosxi/html/includes/utils-menu.inc.php
Change this:
Code: Select all
add_menu_item(MENU_HOME, array(
"type" => "link",
"title" => _("Network Status Map"),
"id" => "menu-home-networkstatusmap",
"order" => 401,
"opts" => array(
"href" => get_statusmap_link()
)
));
to this:
Code: Select all
add_menu_item(MENU_HOME, array(
"type" => "link",
"title" => _("Network Status Map"),
"id" => "menu-home-networkstatusmap",
"order" => 401,
"opts" => array(
"href" => "includes/page-default-splash.php"
)
));
It'll just reload the main page basically. I tried removing that section entirely, but that caused the other map links to disappear as well. Not a ton of time to play with this, but it's a start.
You'll need to actually click Home for this to refresh, since our refresh seems to affect the inner frames only. And of course this will be overwritten on an upgrade.
Re: How do I remove an item from the Home menu
Posted: Thu Feb 04, 2016 6:36 pm
by SteveBeauchemin
Trevor,
Thanks for trying. I had the same experience, that all items under Maps vanished if I removed that section of code.
I took a different path while waiting for a forum solution. I changed some other code, modified the case statement and made the command drop through to use the default page. I edited status.php and commented out the case for map. With no match is uses the 'default' at the bottom of the case statement. Still not removed from the menu but much less dangerous for my installation.
cd /usr/local/nagiosxi/html/includes/components/xicore
vi status.php
//case "map":
// show_status_map();
// break;
by inserting // in the code it becomes commented out and that command will drop down to use the default page
As long as it stops folks from trying and failing to get that page open.
I have 8700+ hosts and 37900 services. The map just won't open for a very long time, and will be useless once it does open.
Thanks.
Steve B
Re: How do I remove an item from the Home menu
Posted: Fri Feb 05, 2016 10:20 am
by hsmith
Is there anything else we can do for you? It seems like it would be a good thing to feature request, but I have a feeling it wouldn't see much traction, as it's a pretty out of the ordinary scenario.
Re: How do I remove an item from the Home menu
Posted: Fri Feb 05, 2016 2:36 pm
by SteveBeauchemin
Close it I guess. Too bad that function does not work for my installation size.
Thanks
Steve B
Re: How do I remove an item from the Home menu
Posted: Fri Feb 05, 2016 2:41 pm
by hsmith
I'll link this thread to the developers to see if there are any optimization possibilities. You have a pretty giant environment.
Re: How do I remove an item from the Home menu
Posted: Fri Feb 05, 2016 2:48 pm
by tmcdonald
SteveBeauchemin wrote:
I have 8700+ hosts and 37900 services.
... Wow.
That's uh... That's a lot. What sort of hardware do you have? Usually around 20k we see systems hit their limit without some tweaking. What optimizations have you performed?