can the databse be set back to default?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sal@coned
Posts: 72
Joined: Thu Jan 21, 2010 4:42 pm

can the databse be set back to default?

Post by sal@coned »

NagisXI 2011R1.1
CentOS 5.4
VMware image running on ESX

This may be stupid question, but since I installed the new version of NagiosXI I keep on running into one issue after the other.

First I could not see any performance graphs ( that was resolved )
I am now getting a Failed status on the "Monitoring Engine" and the "Event Data"

I had created one host group "windows_server"
I created two services using the check_nrpe command to check disk space and physical memory
both of these services were tested on the command line and worked properly
I then associated the services with the hostgroup "windows_server"

When I created my first host and associated it with the "windows_server" I could not apply the configuration
The logs said there was an error with the win_system.cfg file ( That the name of the services I created )

I deleted the host and services I created and keep getting the same error
I whent into the server and the /usr/local/nagios/etc/services/win_system.cfg file was still there even after I deleted

So I am assuming the data still exists in the database and the file keeps getting recreated.
Is there a way to set the database back to default with out recreating the server from scratch ?

I apologize for the lengthy letter, but I have not run into this many issues with the old version and its getting frustrating.

Thanks for the help
Sal
sal@coned
Posts: 72
Joined: Thu Jan 21, 2010 4:42 pm

Re: can the databse be set back to default?

Post by sal@coned »

This is the error I get when I apply the configuration

Processing object config file '/usr/local/nagios/etc/services/www.google.com.cfg'...
Processing object config file '/usr/local/nagios/etc/services/win_system.cfg'...
Error: Invalid max_check_attempts value for host 'tampafs'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/tampafs.cfg', starting on line 14)
Error processing object config files!


The thing to note is that both the win_system service and the tampafs host have both been deleted.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: can the databse be set back to default?

Post by mguthrie »

Check these solutions for hosts that can't be deleted correctly.

http://support.nagios.com/wiki/index.ph ... lete_Hosts
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA

Re: can the databse be set back to default?

Post by tonyyarusso »

Being able to reset to the defaults is also a useful idea - I'm working on figuring out what's necessary for that right now.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA

Re: can the databse be set back to default?

Post by tonyyarusso »

All right, here it is. Upload the two attached files to your XI server (via scp), and then log in on a console, and run this from whatever directory you put them in:

Code: Select all

chmod +x restore_defaults.sh
./restore_defaults.sh
You do not have the required permissions to view the files attached to this post.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
sal@coned
Posts: 72
Joined: Thu Jan 21, 2010 4:42 pm

Re: can the databse be set back to default?

Post by sal@coned »

Thank you, this helps out allot.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: can the databse be set back to default?

Post by rdedon »

Please keep us in the loop either way. Thanks!
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com