Nagios and SQL -- bad combination?
Dan Hopkins
dan.hopkins at uk.easynet.net
Fri Aug 13 18:15:11 CEST 2004
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of
> Youngblood, Gregory (SAIC)
> Sent: 13 August 2004 16:50
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Nagios and SQL -- bad combination?
>
>
> Can someone clarify how Nagios uses the SQL database? Unless
> I'm missing
> something, it appears data is updated in the database by
> deleting all rows
> and inserting them again, for each test. That can't be right, can it?
>
> Either something is wrong with my config (if so, I'd welcome any
> corrections), or Nagios and SQL (Postgres) has a few issues.
>
> Nagios appears to run fine for a while, and then bogs down.
<snip>
We had the same problem with PgSQL. I believe it's more to do with the way postgres handles updates/deletes than with nagios. Deletions aren't removed from tables until you perform a full vacuum, so until then the table will continue to grow each time a change is made, eventually leaving you with massive chains in the table structure. Since a full vacuum needs an exclusive lock, this means nagios downtime - which isn't particularily useful for a monitoring system...
We spent a few days wrestling with this (even vacuums every minute or two weren't enough to solve the problem) and after 24 hours or so, everything would grind to a halt. So eventually we switched to MySQL which runs perfectly (mind you, we are logging ALL service alerts to db, so it remains to be seen how well MySQL will cope with millions of rows ... not as well as Pg I assume)
FYI our experience was based on Pg 7.3 (things may have changed with recent releases?) We were running the DB on a 3Gig xeon with hyperthreading, 2Gig RAM and some fast disks. Monitoring around 2500 services across 2000 hosts.
Please let us know if you do have any success with it
Kind Regards,
--
Dan Hopkins
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list