error applying configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
matson-itops
Posts: 108
Joined: Wed Nov 18, 2015 11:19 pm

Re: error applying configuration

Post by matson-itops »

attaching configs to you in private message
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: error applying configuration

Post 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
matson-itops
Posts: 108
Joined: Wed Nov 18, 2015 11:19 pm

Re: error applying configuration

Post 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?
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: error applying configuration

Post 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!
matson-itops
Posts: 108
Joined: Wed Nov 18, 2015 11:19 pm

Re: error applying configuration

Post by matson-itops »

ok thank you! appreciate all the help
Locked