<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>Slow performance with Nagios 1.1 and MYSQL</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">First off, let me say I love nagios keep up the great work.</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"></FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">I upgraded 1.0 to 1.1 yesterday, and as part of that upgrade I setup db support via mysql.</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"></FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">Since the upgrade, generating any graph or report is god awful slow.</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> </FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">I’ve</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> seen a couple of post regarding the subject but most</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">people</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> do supply any details so here I go.</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Example: </FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">When I run the</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">“</FONT></SPAN><SPAN LANG="en-us">Most Recent Alerts” report (<A HREF="http://">http://</A>server.remove.com /nagios/cgi-bin/summary.cgi) and I select “25 Most Recent Hard Alerts”. It will take 2 mins to generate.</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">I’m only monitoring 4 hosts with this box and a total of 29 services.</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Here is a TOP from the box while the script is running:</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">last pid: 34215; load averages: 0.49, 0.17, 0.09 up 3+15:09:57 12:34:08</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">63 processes: 2 running, 61 sleeping</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">CPU states: 80.5% user, 0.0% nice, 15.4% system, 1.8% interrupt, 2.3% idle</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Mem: 47M Active, 121M Inact, 60M Wired, 13M Cache, 35M Buf, 652K Free</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Swap: 489M Total, 32M Used, 457M Free, 6% Inuse</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">34203 www 114 0 1728K 1076K RUN 0:31 88.62% 72.46% summary.cgi</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Here is a TOP after its running:</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">last pid: 34517; load averages: 0.24, 0.22, 0.12 up 3+15:11:50 12:36:01</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">66 processes: 1 running, 65 sleeping</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">CPU states: 0.0% user, 0.0% nice, 9.1% system, 0.0% interrupt, 90.9% idle</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Mem: 47M Active, 125M Inact, 60M Wired, 11M Cache, 35M Buf, 656K Free</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Swap: 489M Total, 32M Used, 457M Free, 6% Inuse</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">94559 www 4 0 8844K 5220K sbwait 0:09 1.46% 1.46% httpd</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Here are the configure options I used when I compiled nagios:</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">CPPFLAGS="-I/usr/include -I/usr/local/include/mysql"</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">LDFLAGS="-L/usr/lib -L/usr/local/lib/mysql -L/lib"</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">./configure --prefix=/usr/local \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-mysql-comments \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-mysql-downtime \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-mysql-retention \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-mysql-status \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-mysql-inc=/usr/local/include/ \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-mysql-lib=/usr/local/lib/mysql \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-command-user=nagios \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-command-grp=www \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-nagios-user=nagios \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-nagios-grp=nagios \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-template-objects \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-template-extinfo \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-init-dir=/usr/local/etc/rc.d \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --sbindir=/usr/local/share/nagios/cgi-bin \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --libexecdir=/usr/local/libexec/nagios \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --datadir=/usr/local/share/nagios \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --sysconfdir=/usr/local/etc/nagios \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --localstatedir=/usr/local/var/nagios \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-gd-lib=/usr/local/lib \</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> --with-gd-inc=/usr/local/include/gd</SPAN></P>
<BR>
<P ALIGN=LEFT><SPAN LANG="en-us">Thanks for any help in advance:</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Regards</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us">Joe</SPAN></P>
</BODY>
</HTML>