Page 1 of 1
Can't remove hosts?
Posted: Thu Jun 14, 2012 3:41 pm
by dawesinnz
Hey guys - I'm new to Nagios and hit a bit of an issue. Can't find anything on the mighty interweb either. I have 2 hosts that I have deleted the associated services from and then the hosts from within Core Config Mgr, but still show up in the main screen showing all hosts.
Any clues on how to tidy these up?
Cheers
Mike
Re: Can't remove hosts?
Posted: Thu Jun 14, 2012 3:48 pm
by scottwilkerson
After you deleted the services and hosts did you Apply Configuration?
Re: Can't remove hosts?
Posted: Thu Jun 14, 2012 4:12 pm
by dawesinnz
I thought I had. So I went in and re-added the hosts, then added services, then deleted the services on one and then the host, then applied the config. That has worked for 1 server but doesn't for the other. I'll re-do and post the exact error shortly. Thanks for your assistance.
Re: Can't remove hosts?
Posted: Thu Jun 14, 2012 4:50 pm
by lmiltchev
Before you apply configuration, you can check if you have any config errors via the Write Config Tool. Nagios cannot start or restart with bad configuration, so it is a good idea to verify your configs, fix any errors that you might have, and then apply configuration. Here is some info on how to use the Write Config Tool:
http://assets.nagios.com/downloads/nagi ... tabase.pdf
Hope this helps.
Re: Can't remove hosts?
Posted: Thu Jun 14, 2012 5:07 pm
by dawesinnz
The only warnings are:
Warning: Duplicate definition found for service 'Ping' on host 'server2.domain.co.nz' (config file '/usr/local/nagios/etc/services/server2.domain.co.nz.cfg', starting on line 78)
Warning: Duplicate definition found for service 'Memory Usage' on host 'server2.domain.co.nz' (config file '/usr/local/nagios/etc/services/server2.domain.co.nz.cfg', starting on line 46)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'server2.domain.co.nz' (config file '/usr/local/nagios/etc/services/server2.domain.co.nz.cfg', starting on line 30)
Warning: Duplicate definition found for service 'CPU Usage' on host 'server2.domain.co.nz' (config file '/usr/local/nagios/etc/services/server2.domain.co.nz.cfg', starting on line 14)
Total Warnings: 0
Total Errors: 0
Ad that is for the host I am trying to remove
Re: Can't remove hosts?
Posted: Thu Jun 14, 2012 5:10 pm
by dawesinnz
And when i try to delete I get:
Applying Configuration
Command submitted for processing...
Waiting for configuration verification......
Configuration verification failed.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
This is the VM image of XI 2011R2.4 as downloaded a few days ago.
Re: Can't remove hosts?
Posted: Thu Jun 14, 2012 8:56 pm
by dawesinnz
Hey guys - don't worry I have it working now. Still can't delete but have actually got the host doing what I needed so happy it can stay there.
Cheers