Can't remove hosts?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dawesinnz
Posts: 5
Joined: Thu Jun 14, 2012 3:32 pm

Can't remove hosts?

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Can't remove hosts?

Post by scottwilkerson »

After you deleted the services and hosts did you Apply Configuration?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
dawesinnz
Posts: 5
Joined: Thu Jun 14, 2012 3:32 pm

Re: Can't remove hosts?

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't remove hosts?

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dawesinnz
Posts: 5
Joined: Thu Jun 14, 2012 3:32 pm

Re: Can't remove hosts?

Post 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
dawesinnz
Posts: 5
Joined: Thu Jun 14, 2012 3:32 pm

Re: Can't remove hosts?

Post 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.
dawesinnz
Posts: 5
Joined: Thu Jun 14, 2012 3:32 pm

Re: Can't remove hosts?

Post 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
Locked