Page 1 of 1
Empty database ndo2b
Posted: Mon Jul 13, 2015 8:51 am
by iulianbadea
I'm using nagios 4.0.8 with ndo2db 2.0. Is it safe to drop ndo database and recreate it? I have some problems with nagvis, probably since I didn ndo2db db upgrade. Do I need all the data from ndo database?
Re: Empty database ndo2b
Posted: Mon Jul 13, 2015 9:33 am
by jdalrymple
iulianbadea wrote:I'm using nagios 4.0.8 with ndo2db 2.0. Is it safe to drop ndo database and recreate it?
No
iulianbadea wrote:Do I need all the data from ndo database?
Yes
I suggest troubleshooting the NagVis issue from that end.
Re: Empty database ndo2b
Posted: Mon Jul 13, 2015 9:39 am
by iulianbadea
Ok, can you please tell me what will I lose if I drop the database?
Re: Empty database ndo2b
Posted: Mon Jul 13, 2015 10:20 am
by jdalrymple
iulianbadea wrote:Ok, can you please tell me what will I lose if I drop the database?
Code: Select all
Tables_in_nagios
nagios_acknowledgements
nagios_commands
nagios_commenthistory
nagios_comments
nagios_configfiles
nagios_configfilevariables
nagios_conninfo
nagios_contact_addresses
nagios_contact_notificationcommands
nagios_contactgroup_members
nagios_contactgroups
nagios_contactnotificationmethods
nagios_contactnotifications
nagios_contacts
nagios_contactstatus
nagios_customvariables
nagios_customvariablestatus
nagios_dbversion
nagios_downtimehistory
nagios_eventhandlers
nagios_externalcommands
nagios_flappinghistory
nagios_host_contactgroups
nagios_host_contacts
nagios_host_parenthosts
nagios_hostchecks
nagios_hostdependencies
nagios_hostescalation_contactgroups
nagios_hostescalation_contacts
nagios_hostescalations
nagios_hostgroup_members
nagios_hostgroups
nagios_hosts
nagios_hoststatus
nagios_instances
nagios_logentries
nagios_notifications
nagios_objects
nagios_processevents
nagios_programstatus
nagios_runtimevariables
nagios_scheduleddowntime
nagios_service_contactgroups
nagios_service_contacts
nagios_service_parentservices
nagios_servicechecks
nagios_servicedependencies
nagios_serviceescalation_contactgroups
nagios_serviceescalation_contacts
nagios_serviceescalations
nagios_servicegroup_members
nagios_servicegroups
nagios_services
nagios_servicestatus
nagios_statehistory
nagios_systemcommands
nagios_timedeventqueue
nagios_timedevents
nagios_timeperiod_timeranges
nagios_timeperiods
1) I would discourage you (or anyone) from dropping the tables when truncating them should be fine.
2) Deleting the data from ndo removes all of the data Nagios needs to function, host data, service data, historical data, etc. In theory this should all repopulate when nagios and ndo are restarted, but why would you take the chance of breaking a perfectly good working Nagios to repair a broken NagVis? Fix NagVis.
3) The "in theory" above would be putting back the same data that is currently there, what are you hoping to gain? If NagVis doesn't like the data there now it's not going to like the data there after you restart ndo/nagios and ropop the data.
If you find your system in a state of broken monitoring after fiddling with ndo - we'll likely suggest that you reinstall because it's far easier than trying to debug ndo issues via support forums.
Re: Empty database ndo2b
Posted: Mon Jul 13, 2015 10:26 am
by iulianbadea
I did a clone of the production nagios server and tested this. Everything seems to work, including nagvis. It seems something broke between ndo database updates and nagvis does not like it. With ndo database recreated, everything works.
Re: Empty database ndo2b
Posted: Mon Jul 13, 2015 10:33 am
by jdalrymple
iulianbadea wrote:I did a clone of the production nagios server and tested this.
Thanks for that... There is a lot of database manipulation done with reckless abandon that we have to try to pick up the pieces of and put back together so you can understand my hesitation to recommend any drop db statements.
OK to lock the thread?
Re: Empty database ndo2b
Posted: Mon Jul 13, 2015 10:53 am
by iulianbadea
Ok, thanks