Page 1 of 1

Fail on apply config reverts config but not database

Posted: Wed Mar 26, 2014 10:06 am
by XenoPhage
Subject says it all, really. I just ran into this again. I removed (deleted) a host from our Nagios instance (2012R2.9) and then ran the apply configuration. The apply failed because there was a dependency I wasn't aware of. No big deal, I went in and resolved the dependency. Apply the config again which succeeded. However, the host is still being monitored because the .cfg file still exists.

From what I'm seeing, the config files are reverted, but the database isn't reverted. Without the database being reverted, it appears that the only way to resolve this is to manually delete the .cfg file from the file system.

This appears to be similar to this locked topic :

http://support.nagios.com/forum/viewtop ... ot+removed

Is this a known issue? I seem to remember it being brought up before, but I'm not sure I've ever seen a resolution.

Re: Fail on apply config reverts config but not database

Posted: Wed Mar 26, 2014 11:04 am
by BanditBBS
This is a known issue and as you said, easily resolved by manually deleting the file. The way I make sure this doesn't happen to me anymore, is I use the write config files link and then verify, if no issue I then do an apply. If there was an issue, I correct it first. This way my configurations and database never get out of sync. I mainly only do this when doing a deletion.

Re: Fail on apply config reverts config but not database

Posted: Wed Mar 26, 2014 11:07 am
by XenoPhage
It's easy enough to work around, sure, but it's unexpected behavior. I wanted to point it out again so maybe it gets fixed. :)

Re: Fail on apply config reverts config but not database

Posted: Wed Mar 26, 2014 11:10 am
by BanditBBS
XenoPhage wrote:It's easy enough to work around, sure, but it's unexpected behavior. I wanted to point it out again so maybe it gets fixed. :)
I can't argue that :)

Re: Fail on apply config reverts config but not database

Posted: Wed Mar 26, 2014 12:12 pm
by lmiltchev
It is a known issue, and yes, it will be fixed in Nagios XI 2014.