Need help reverting back to old snapshot

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gamechanger
Posts: 16
Joined: Fri Apr 27, 2012 11:21 am

Need help reverting back to old snapshot

Post by gamechanger »

Hi Nagios XI support,

I am trying to deploy nagios XI for us and have few questions. My first one being, how do I revert back to last night's snapshot configs? I tried using the bulk import wizard and it looks like my configs broke. I tried deleting the services and hosts but still can't get configs to apply. Now I am totally stuck because I can't change anything on the system.

My systems:
AWS Ami downloaded from NagiosXI on a large ec2 instance.

Thanks,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Need help reverting back to old snapshot

Post by scottwilkerson »

There isn't a way to do this in the web ui yet (coming in 2012)

The best way to fix the config errors you have is to go to
Configure -> Write Config Files
And sequentially click the top 3 buttons stopping on errors, then fixing them

Repeat

Once no errors click the 4th button to apply the good configuration
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
gamechanger
Posts: 16
Joined: Fri Apr 27, 2012 11:21 am

Re: Need help reverting back to old snapshot

Post by gamechanger »

Its hard to make out what its complaining about, the error I see is the following.

Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/fe5.i.gamechanger.io.cfg', starting on line 14)
Error processing object config files!

I went into the file and checked the host name and its setup correctly. Can I just copy the config from working machine, say fe3 and copy it to fe5 and change the name in there? Will that fix it?

I confirmed that only reason why its failing is because new server doesn't have the check commands. I am not sure how check commands would be missed when cloning from a target machine during bulk upload. Is there a way to go to enable check commands for this hosts so I can write the configurations?

during bulk import I did the following.

1) Selected the wizard.
2) Selected a source host ot use - fe3
3) Defined hostname as a single value and hit submit.

I wanted to see if I can clone a single host before rolling out rest of them but it looks like it bombed.
Last edited by gamechanger on Fri Apr 27, 2012 1:58 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Need help reverting back to old snapshot

Post by scottwilkerson »

gamechanger wrote:I went into the file and checked the host name and its setup correctly. Can I just copy the config from working machine, say fe3 and copy it to fe5 and change the name in there? Will that fix it?
No, these files get written everytime you apply configuration, if you added any files manually this could be part of why it is breaking. The only place static files can be maintained is in the /usr/local/nagios/etc/static directory, and then you need to make sure you don't have naming conflicts.

Look, at Configure -> Core Config Manager -> Services
Select fe5.i.gamechanger.io.cfg from the dropdown list

the problem is in one of these services, and it has the following problems

Service description, host name, or check command is NULL
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need help reverting back to old snapshot

Post by lmiltchev »

This means that most probably you don't have a check command defined for this service. Go to the Core Config Manager->Monitoring->Services-><your service>->Modify and select the proper "check command". If you have to, you can define a new command by going to: Core Config Manager->Commands->Commands->Add New.

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
gamechanger
Posts: 16
Joined: Fri Apr 27, 2012 11:21 am

Re: Need help reverting back to old snapshot

Post by gamechanger »

I know exactly whats going on, during bulk import, it failed to copy all the services correctly. Although services did get copied over, they don't have check commands.

is there a way I can just remove this host and all services associated with it?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need help reverting back to old snapshot

Post by lmiltchev »

Yes, you can remove it through the Core Config Manager. You will have to remove all the the services associated with this host first, then you can remove the host. You can read more about host management here:

http://assets.nagios.com/downloads/nagi ... gement.pdf

Hope this helps!
Be sure to check out our Knowledgebase for helpful articles and solutions!
gamechanger
Posts: 16
Joined: Fri Apr 27, 2012 11:21 am

Re: Need help reverting back to old snapshot

Post by gamechanger »

Thanks, That worked! Phew!!

I am going to try cloning a host again and see if it works. Is there a reason why bulk creation may not create check commands for all the services?


-Sunil
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Need help reverting back to old snapshot

Post by scottwilkerson »

I don't know why it wouldn't using the bulk import wizard.

You might want to look at this document so you will have a backup to restore back to
http://library.nagios.com/library/produ ... -nagios-xi
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
gamechanger
Posts: 16
Joined: Fri Apr 27, 2012 11:21 am

Re: Need help reverting back to old snapshot

Post by gamechanger »

Can you recommend another way for me to quickly clone existing hosts/services? I build model machines to clone for rest of the infrastructure. I don't mind trying out alternative ways if bulk won't work for me.

Thanks,

-Sunil
Locked