Nagios Core Config Manager Problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
kinson
Posts: 5
Joined: Wed Jan 13, 2010 5:45 pm

Nagios Core Config Manager Problem

Post by kinson »

I just downloaded and ran the Nagios XI 2009R1 VMware image and I am having problems with the Nagios Core Config Manager. I created a few test host and service checks and would like to delete one of the services. When I go in to delete the service config using the Manager it says it completed successfully but after applying the configuration, I go back and it is still there. I have made no changes to the vm beyond changing the root and nagiosadmin passwords. I have used NagiosQL 3.03 before and have never had this problem. Thanks in advance for any help!
fkroeger
Posts: 38
Joined: Mon Jan 18, 2010 10:45 pm
Location: Perth, Western Australia

Re: Nagios Core Config Manager Problem

Post by fkroeger »

Having exactly the same problem.
Had to change the group ownership of the *.cfg files so that I could apply the conguration , however the deleted hostname always " re-appears"
clauretano
Posts: 2
Joined: Tue Jan 19, 2010 1:12 pm

Re: Nagios Core Config Manager Problem

Post by clauretano »

Looks like I'm having the same trouble. I added a handful of hosts, but in my haste it looks like I added one twice. It's for a site I have to monitor, and when I check the hosts lists one is listed as sitename.com and the other is www.sitename.com. I can go through and delete hosts and services but when I apply the config, the old ones come back.

Also, when I modify a service for a host that uses check_xi_service_http_content to change the string it searches for on the page, after saving and applying the config I go back and it's still checking for the old string. I can add new services fine, I just can't modify/delete. It sure feels like a permissions issue.

This is when I regret not doing the whole nagios setup by hand.

fkroeger, what group did you assign ownership of all the .cfg files? They're all owned by group "nagios" now, but there's also a "nagcmd" group.
jcardellio
Posts: 2
Joined: Tue Jan 19, 2010 3:44 pm

Re: Nagios Core Config Manager Problem

Post by jcardellio »

I am having the same issue as well.

Although you can still add/remove/edit through the core config manager, adding anything using the wizards will cause the hosts added to become "stuck" and no longer editable from the web interface.
igae
Posts: 1
Joined: Wed Jan 20, 2010 12:21 pm

Re: Nagios Core Config Manager Problem

Post by igae »

I have an installation of 800 nodes and when I try to
> write the configuration files, only writes some.

> Best regards
BHA
Posts: 1
Joined: Thu Jan 21, 2010 11:59 am

Re: Nagios Core Config Manager Problem

Post by BHA »

Having the exact same problem. The hosts I created through the wizard don't want to delete. Using Putty I manually deleted the .cfg files in question, but as soon as I go back into the Core Config the hosts report as 'Sync issue'. If I hit apply they go back 'in sync' and the .cfg files re-appear!

Sounds like they are getting created again from the DB when you hit apply. Maybe manually removing the entries from the DB and then removing the .cfg files might work? Might try that now.
jcardellio
Posts: 2
Joined: Tue Jan 19, 2010 3:44 pm

Re: Nagios Core Config Manager Problem

Post by jcardellio »

I was able to fix this issue by changing the owner of the config files to "apache". Once in a while these files will get set to nagios.nagios so you have to go back in and reset the permissions.

Hope this helps :D

Command:
chown apache.nagios /usr/local/nagios/etc/*.cfg

*note* You may need to change the permissions on the config files in services and hosts as well.
fkroeger
Posts: 38
Joined: Mon Jan 18, 2010 10:45 pm
Location: Perth, Western Australia

Re: Nagios Core Config Manager Problem

Post by fkroeger »

Still can't delete hosts! I previously changed the group ownership of the .cfg files to apache - which allowed me to update the configs.
I have since changed the ownership to apache as suggested by jcardellio.
However, when I delete the host from the Core Config Manager, it reports that it is successfully deleted - but when I apply the configuration I see that it shows the config file for that host is still being processed.
This suggests that I can't delete the entry from the d/base - even though it reports that is was successful.
User avatar
egalstad
Posts: 76
Joined: Thu Oct 29, 2009 2:07 pm

Re: Nagios Core Config Manager Problem

Post by egalstad »

We'll add some code that warns the admin about incorrect file permissions on the config files.

I'm guessing the issue is that something is going wrong with the NagiosQL export, or there is a problem with your Nagios config files. If there's a configuration error when you "apply changes", there are a few things that happen:

1. Any config files in /usr/local/nagios/etc/import get imported into NagiosQL
2. A full export of NagiosQL is done, which re-created several config files in /usr/local/nagios/etc, as well as the /usr/local/nagios/etc/hosts, and /usr/local/nagios/etc/services directories.
3. The configuration is verified with Nagios (using the -v command line option)
4. If the config is okay, a "good" snapshot of the config is created and Nagios Core restarts
5. If the config has errors, a "bad" snapshot of the config is created, the last "good" snapshot is extracted, and Nagios core gets restarted using the old/last known good snapshot.

In order to see what's going on, see if there are recent error snapshots (Admin -> Config Snapshots). If there are, you should be able to download the text output from the config verification process.

Lastly, try doing a manual export of the database to see if you notice any errors. This process is described in the guide located at:
http://library.nagios.com/library/produ ... n-database
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
kinson
Posts: 5
Joined: Wed Jan 13, 2010 5:45 pm

Re: Nagios Core Config Manager Problem

Post by kinson »

I have tried this several times and from what I can tell, the NagiosQL portion of the app does not remove the hosts or services from the database if they were added using the config wizard. If it is not being removed from the database, then its not going to remove the config files if NagiosQL exports them each time. My company has been using Nagios Core with NagiosQL for quite a while and has never had issues like this. I am trying to convince them that it is worth buying the license for NagiosXI, but it is hard to justify it when the application has issues removing hosts. A VM image should work without having to "fix" things. For now this is a deal breaker.
Locked