Page 1 of 1

Quick Question

Posted: Wed Feb 08, 2012 1:24 pm
by cwscribner
If I want to delete a huge batch of devices and services do I:

a) Delete all corresponding config files

OR

b) Delete them via the interface

Is there a reason to use one method over the other?

Edit: Thanks! That's all I needed!

Re: Quick Question

Posted: Wed Feb 08, 2012 1:45 pm
by scottwilkerson
cwscribner wrote:If I want to delete a huge batch of devices and services do I:

a) Delete all corresponding config files

OR

b) Delete them via the interface
If they were created in the interface they need to be deleted in the interface, but if you have files in the /usr/local/nagios/etc/static they would need to be deleted from the config files.
cwscribner wrote: Is there a reason to use one method over the other?
Yes, if you delete the cfg files directly (not including those in /usr/local/nagios/etc/static ) they will just reappear the next time you Apply configuration. The info is stores in the nagiosql database until it is removed through the interface, and every time you apply the configuration successfully, all of the cfg files (again excluding those in /usr/local/nagios/etc/static ) are re-written using the information in the database.

Re: Quick Question

Posted: Wed Feb 08, 2012 1:46 pm
by lmiltchev
I would suggest deleting them through the Core Config Manager even though it may seem like more work to you. It is safer and you will be warned if there are some dependencies. You can always click on the "Information" button and find out if the deletion is possible for this particular host/service. Please, review our documentation on the topic:

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