WEB-Interface performance
Rob Moss
robmossrm at aol.com
Thu Oct 6 12:16:08 CEST 2005
Marcel Mitsuto Fucatu Sugano wrote:
> Hi nagios-user list,
>
> I don't know how to begin this question, because i can't imagine how
> much use of the nagios web-interface is made by the people who read
> this list. But here we use nagios to actively check something around
> 10k services now, and up to 2300 hosts. Lately we upgrade our
> monitoring pool of machines, setting up a distributed framework to
> agregate all warnings at one unique webserver. So far, this new
> framework is doing its job, but sometimes, we get around 15 people
> connected to the nagios web-interface, and the status.cgi is taking
> too much time to load. So here is my question:
> "Is there any ./configure options, or any set of CFLAGS to improve
> performance of the cgis?" Here's a snipet from top:
>
[snip]
> Finally, the machine that's serving the interface is getting passive
> messages from the active monitoring agents and is a Pentium4 HT-SMP
> processor, with 2GB memory, SATA HDD, running SuSE9.3 with kernel
> 2.6.11-8-SMP.
Yeah, there are some CFLAGS you could be using to optmise your build.. I
am assuming that you have a recent version of GCC, and that your P4 HT
cpu is shown as having two logical CPU's
Try rebuilding with the following command:
cd nagios-2.0b4
CC=gcc CFLAGS="-mtune=i686 -O3 -pipe -march=i686 -funroll-loops
-ffast-math" \
./configure --prefix=/usr/local/nagios ...... [rest of nagios
configure commands]
The main problem is that you have thousands of hosts, and thousands of
services to read in every time you run status.cgi. No matter how
efficient the program is, reading in and displaying that much data is
going to take a while, and running the same program 15 times
simultaneously is going to affect your performance as you see here. How
many lines is the status.dat file? I only have a few hundred hosts and
services, and the file is 23,000 lines or so, half a meg on disk.. I
would imagine yours is closer to about 50mb and closer to a million lines.
Some alternatives might be updating the Nagios sidebar so that it
doesn't display ALL hosts by default, maybe just a smaller hostgroup..
(although i suspect the status.cgi needs to read in the whole file) Or
replacing the standard nagios CGI's with something that is more geared
towards handling hundreds of thousands of hosts/services...
Or perhaps you could have a separate display server, a webserver running
the cgi's which reads in the nagios status.dat file over the network
from the nagios server, and does all the processing away from the nagios
collector.. This would move processing off of the nagios collector.. You
could use rsync to keep the two files in sync, keep a duplicate on the
display server on a local disk (or a tmpfs memory based filesystem for
extra speed)...
Hope this helps
rob.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051006/0e988f5e/attachment.html>
More information about the Users
mailing list