Load Balancing WebGUI

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
delboy1966
Posts: 94
Joined: Thu Oct 22, 2015 5:26 am

Load Balancing WebGUI

Post by delboy1966 »

Hi all.

We are trying to speed up our Nagios WebGUI and have done just about everything we can to achieve this.

We have an environment where we have one main Nagios server and all checks are done by 6 mod_gearman nodes.
So our main Nagios server isn't really doing any checks, its just accepting the check results and processing them.

We have moved our main Nagios server to an all flash VM environment for faster disk access.
The number of CPUs has been doubled from 2 to 4
There is 24G RAM and 50G swap

But the WebGUI isn't a quick as some people would like.
We are monitoring around 2500 hosts and 15000 services, all of which are done on mod_gearman nodes
We are running Nagios Core 4.2.4.

The main load seems to be when people are access status.cgi for check info and submitting commands from the GUI.
Running top and watching the individual CPUs I can see most are running at about 30%, then they will jump to 90% and the process on the stop is status.cgi.
We have a lot of people accessing the WebGUI which is why this is happening.

Just wondered if anyone has found a way of load balancing Nagios across more than one server and still have identical information in the output of the WebGUI and are able to run commands from the GUI.
Or if anyone had any suggestions?

Thanks
Tony
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Load Balancing WebGUI

Post by tmcdonald »

I would look into a ramdisk at the very least: https://assets.nagios.com/downloads/nag ... giosXI.pdf

This will help speed up a lot of those CGI calls that parse out the status files. The doc is for an XI install, but is adaptable to Core as well.

Aside from that, I would consider throwing a bit more CPU at the machine if you are going to have a lot of people using the interface at once, though I think the ramdisk is likely to provide more benefit.
Former Nagios employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Load Balancing WebGUI

Post by dwhitfield »

In addition to what @tmcdonald said, have you looked at https://httpd.apache.org/docs/2.4/misc/perf-tuning.html ? Now, you might not be using Apache, but server optimization is still something in which I'd be interested.

Also, I want to additionally highlight the more CPU. We don't know anything about how fast those 4 CPUs are either.

Also, you don't mention what OS you are running. There might be some OS performance tweaks.

Lastly, while it doesn't help you now, Core 4.3 (set for April) has
Performance enhancements to the status.cgi
more info at https://www.nagios.com/roadmaps/
delboy1966
Posts: 94
Joined: Thu Oct 22, 2015 5:26 am

Re: Load Balancing WebGUI

Post by delboy1966 »

Apologies, I did miss some information out as you indicated.

Centos 6.7
CPU: 4 x Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
Apache 2.2.15


Thank you for your advise.
I used to use Ramdisk until we migrated the server to pure flash disks, but have added it again to see if it makes any difference.
Apache is optimized as far as my knowledge allows me to optimize it without breaking anything.

I look forward to the arrival of 4.3 :)

Thanks again.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Load Balancing WebGUI

Post by dwhitfield »

I also wonder if something like Varnish would help. It's not going to help the cgi issues specifically, but if it's really just being slammed by multiple users it might help.

Do you want us to go ahead and lock this up, or leave it open and you can report back after 4.3 is out? You can obviously report back either way...just in a different thread under one of the options. :)
delboy1966
Posts: 94
Joined: Thu Oct 22, 2015 5:26 am

Re: Load Balancing WebGUI

Post by delboy1966 »

Thanks I will take a look at Varnish.
Yes please lock the thread and I will see how 4.3 performs when its out.

Thanks again
Locked