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
Can't remove hosts?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't remove hosts?
After you deleted the services and hosts did you Apply Configuration?
Re: Can't remove hosts?
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?
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.
http://assets.nagios.com/downloads/nagi ... tabase.pdf
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Can't remove hosts?
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
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?
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.
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?
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
Cheers