Out of Sync Configurations from CCM

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
griffithusg
Posts: 64
Joined: Sun Nov 07, 2010 7:16 pm

Out of Sync Configurations from CCM

Post by griffithusg »

So I ran into the sync problem again today, and I've figured out how it gets out of sync.

[working configuration, in sync, snapshot is from this point]
Delete a host
Host's .cfg file gets deleted in the filesystem (etc/hosts/host.cfg)
Repeat 1 and 2
A hostgroup which is defined in CCM becomes empty (because it does not check if a host group has a valid configuration)
Apply Configuration
Files are output to filesystem by XI
Nagios -v is run to verify config
Config verify fails (empty hostgroup)
Config snapshot is rolled back. Deleted host files are brought back as a part of that snapshot rollback.
[out of sync configuration]

And until such time as you fix the config fault (like I just had to), and then delete the out of sync files, you'll be stuck.

I postulate that after you fix the config fault (i.e. don't have an empty hostgroup) and remove all the generated files from etc/hosts, etc/services and then rerun the apply config, the broken files won't creep back in (provided of course the resulting config is valid to nagios this run).

:words:

Obviously, not clearing all the generated files at the time of generating new config files (especially because it generates a file for each host) is pretty stupid. That's the crux of the issue.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Out of Sync Configurations from CCM

Post by slansing »

Obviously, not clearing all the generated files at the time of generating new config files (especially because it generates a file for each host) is pretty stupid. That's the crux of the issue.
What do you mean by not clearing all the generated files at the time of generating new config files? Are you talking about going through and removing services / hosts all at once and not after each apply configuration? You could use the Write Config Tool under the Tools CCM menu to verify your configurations as you go along, so you do not run into trouble.
Locked