nagios/ndo2db... losing data in msyql tables

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
dstone
Posts: 6
Joined: Fri Apr 27, 2012 12:18 pm
Location: lost in Mississippi

nagios/ndo2db... losing data in msyql tables

Post by dstone »

i am using ndo2db and mysql to store historical data, and for some reason i am losing data in mysql tables, in ndo2db.cfg, i have these below values, basically double what the default was, however (note: i currently set them to "0" as a test to see, to soon to tell), but with these values below, i lost data after a week or so, i thought the middle 3 values should allow for 2 weeks.......... any clue?

max_timedevents_age=2880
max_systemcommands_age=20160
max_servicechecks_age=20160
max_hostchecks_age=20160
max_eventhandlers_age=44640



fyi... i am using the below versions of ubuntu, nagios, ndo2db, and mysql...


root@nagios:/usr/local/nagios/bin# cat /proc/version
Linux version 3.2.0-26-generic (buildd@batsu) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012


root@nagios:/usr/local/nagios/bin# ./nagios

Nagios Core 3.3.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-25-2011
License: GPL


root@nagios:/usr/local/nagios/bin# ./ndo2db

NDO2DB 1.4b7
Copyright(c) 2005-2007 Ethan Galstad ([email protected])
Last Modified: 10-31-2007
License: GPL v2


root@nagios:/usr/local/nagios/bin# mysql -V
mysql Ver 14.14 Distrib 5.5.24, for debian-linux-gnu (x86_64) using readline 6.2
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: nagios/ndo2db... losing data in msyql tables

Post by mguthrie »

You're using a fairly old version of ndoutils, I would consider upgrading to 1.5.2.

The other possibility is that you have data corruption in the database. You can run a repair with something like the following (depending on your distro).

Code: Select all

service mysqld stop
myisamchk -r -f /var/lib/mysql/nagios/*.MYI
service mysqld start
Locked