Slow performance with Nagios 1.1 and MYSQL
Joe Marr
joemarr at suscom.net
Fri Nov 21 18:44:21 CET 2003
First off, let me say I love nagios keep up the great work. I upgraded 1.0
to 1.1 yesterday, and as part of that upgrade I setup db support via mysql.
Since the upgrade, generating any graph or report is god awful slow.
I've seen a couple of post regarding the subject but most people do supply
any details so here I go.
Example:
When I run the "Most Recent Alerts" report (http://server.remove.com
/nagios/cgi-bin/summary.cgi) and I select "25 Most Recent Hard Alerts". It
will take 2 mins to generate.
I'm only monitoring 4 hosts with this box and a total of 29 services.
Here is a TOP from the box while the script is running:
last pid: 34215; load averages: 0.49, 0.17, 0.09
up 3+15:09:57 12:34:08
63 processes: 2 running, 61 sleeping
CPU states: 80.5% user, 0.0% nice, 15.4% system, 1.8% interrupt, 2.3%
idle
Mem: 47M Active, 121M Inact, 60M Wired, 13M Cache, 35M Buf, 652K Free
Swap: 489M Total, 32M Used, 457M Free, 6% Inuse
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
34203 www 114 0 1728K 1076K RUN 0:31 88.62% 72.46%
summary.cgi
Here is a TOP after its running:
last pid: 34517; load averages: 0.24, 0.22, 0.12
up 3+15:11:50 12:36:01
66 processes: 1 running, 65 sleeping
CPU states: 0.0% user, 0.0% nice, 9.1% system, 0.0% interrupt, 90.9%
idle
Mem: 47M Active, 125M Inact, 60M Wired, 11M Cache, 35M Buf, 656K Free
Swap: 489M Total, 32M Used, 457M Free, 6% Inuse
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
94559 www 4 0 8844K 5220K sbwait 0:09 1.46% 1.46% httpd
Here are the configure options I used when I compiled nagios:
CPPFLAGS="-I/usr/include -I/usr/local/include/mysql"
LDFLAGS="-L/usr/lib -L/usr/local/lib/mysql -L/lib"
./configure --prefix=/usr/local \
--with-mysql-comments \
--with-mysql-downtime \
--with-mysql-retention \
--with-mysql-status \
--with-mysql-inc=/usr/local/include/ \
--with-mysql-lib=/usr/local/lib/mysql \
--with-command-user=nagios \
--with-command-grp=www \
--with-nagios-user=nagios \
--with-nagios-grp=nagios \
--with-template-objects \
--with-template-extinfo \
--with-init-dir=/usr/local/etc/rc.d \
--sbindir=/usr/local/share/nagios/cgi-bin \
--libexecdir=/usr/local/libexec/nagios \
--datadir=/usr/local/share/nagios \
--sysconfdir=/usr/local/etc/nagios \
--localstatedir=/usr/local/var/nagios \
--with-gd-lib=/usr/local/lib \
--with-gd-inc=/usr/local/include/gd
Thanks for any help in advance:
Regards
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20031121/ea4c0338/attachment.html>
More information about the Users
mailing list