Page 2 of 2
Re: error applying configuration
Posted: Fri Jul 30, 2021 12:18 pm
by matson-itops
attaching configs to you in private message
Re: error applying configuration
Posted: Fri Jul 30, 2021 2:02 pm
by gsmith
Hi
Mike Lim is in the contacts twice. Once with all his info, and once as just a contact_name.
You can use the Core Config Manager to edit Contacts and blow away the second instance
of Mike Lim. Then try to Apply Config.
Thanks
Re: error applying configuration
Posted: Fri Jul 30, 2021 4:19 pm
by matson-itops
that worked. I took "Mike" out of contacts.cfg file, but somehow that did not update until I did it through the GUI?
thanks so much!
can you kindly explain why?
Re: error applying configuration
Posted: Fri Jul 30, 2021 4:37 pm
by gsmith
Hi
At the top of each .cfg file is this disclaimer:
###############################################################################
#
# Contacts configuration file
#
# Created by: Nagios CCM 3.1.0
# Date: 2021-07-30 10:12:08
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
I believe the .cfg files are a legacy carryover. Nagios Xi sits on top of Nagios Core.
So I think it works like this:
You edit contacts, hosts, services, etc through the gui. When you "Apply Configuration" the
gui writes the changes to the mysql db as well as the .cfg files. The newer XI stuff is able
to pull from the database, while the older Core code pulls from the .cfg files. In order to
keep everything in sync the cfg files get updated every time Apply Configuration is run.
That's why it's OK to hit the "Delete Files" button on the File Config Management page,
and also why your edit to contacts.cfg didn't hold.
Let me know if you have any more questions of if I can lock this thread.
Have a good weekend!
Re: error applying configuration
Posted: Mon Aug 02, 2021 2:19 pm
by matson-itops
ok thank you! appreciate all the help