Deleting Hosts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
elrod121
Posts: 7
Joined: Thu Apr 19, 2012 1:27 am

Deleting Hosts

Post by elrod121 »

I am running XI on a VM in Demo and we are really happy going to pull the trigger this week and make the purchase the only problem that I have ran into so far is deleting hosts. I log in as admin in the Core Configuration Manager and delete both the service and the host and apply the configuration set and it completes successfully however when you go back to the views tab the hosts are still active please help I am ready at this point to remove all of our test hosts and start building a working system. I know that I have to be missing something simple.

Thanks,

elrod121
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Deleting Hosts

Post by scottwilkerson »

elrod121,

Check to see if the host/services still exist in the Core Configuration Manager. If they are gone, it is possible that we somehow have multiple copies of nagios running.

Run

Code: Select all

service nagios stop
killall -9 nagios
service nagios start
If they still show up we might have a database problem, for that we can run

Code: Select all

cd /usr/local/nagiosxi/scripts
./repairmysql.sh nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
elrod121
Posts: 7
Joined: Thu Apr 19, 2012 1:27 am

Re: Deleting Hosts

Post by elrod121 »

Scott,

I have tried both of the CLI fixes about and the hosts are still showing up in the views tab the commands run successfully so at this point i'm not sure what to do I just can't get the 23 test hosts that I initially configured to go away any other idea's?


Thanks,

Jeremy
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Deleting Hosts

Post by scottwilkerson »

Are they cone from the Core Configuration Manager?

Can you go to Configure -> Core Configuration Manager -> Tools -> Write Config Files
Walk through all of the steps reporting any errors

If they are still there you may have files stuck in the following directories
/usr/local/nagios/etc/hosts
/usr/local/nagios/etc/services

you could run the following, then do the steps under Configure -> Core Configuration Manager -> Tools -> Write Config Files

Code: Select all

rm -rf /usr/local/nagios/etc/hosts /usr/local/nagios/etc/services
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
elrod121
Posts: 7
Joined: Thu Apr 19, 2012 1:27 am

Re: Deleting Hosts

Post by elrod121 »

Scott,

We have installed XI on Brand New Hardware and there seems to be issues from the start we built a 1U Quad Core DC Powered Machine with 4gig's of ram to start and did the manual install of Centos and Nagios XI on top of that. The reason for the change is that our VM machines could not see all of out network devices based on where they were sitting on the network. The first host that I attempted to add to the fresh install was our Juniper MX-960 which is our Core Router using that wizard everything seemed to be fine it saw all of the ports based on our naming scheme and so on when I got to the last step and Nagios attempted to apply the configuration it gave me the error message pasted below. So I tried it several more times with the same result after that I did a stop / start of Nagios and then the device showed up as a host be with none of the interfaces the only graph that exists is the ICMP graph. And the host shows up 2 times so I click on config and delete and the system lets me know that it is scheduled to delete which never happens my next step is to delete in the core config manager which gives me another error message please have a look we really want to get this up and running and make the purchase we need a monitoring solution and feel that you guys have what we need we just need to work through the first road blocks to get up and running.

This is the error while trying to delete the host's
Applying Configuration

Command submitted for processing...
Waiting for configuration verification...................................
Configurations failed to write to file.
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.

View a snapshot of this configuration error


Getting the same error while adding the host
Applying Configuration
>
> Command submitted for processing...
> Waiting for configuration verification....................................
> Configurations failed to write to file.
> 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.
>
> View a snapshot of this configuration error
>

Thanks,

Jeremy
elrod121
Posts: 7
Joined: Thu Apr 19, 2012 1:27 am

Re: Deleting Hosts

Post by elrod121 »

I was talking to my Systems Admin tonight and he mentioned that we did the Centos Minimal Core install I wanted to let you know that was the version that we used just in case that was the issue.

Jeremy
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Deleting Hosts

Post by scottwilkerson »

With large config I am guessing the php is timing our before the apply completes. We have a FAQ about this and has instructions on fixing it
http://support.nagios.com/wiki/index.ph ... _Completes
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
elrod121
Posts: 7
Joined: Thu Apr 19, 2012 1:27 am

Re: Deleting Hosts

Post by elrod121 »

Scott,

I have made the changes specified in the file with no change I have attached the output file generated right after I made the change and then tried to apply the configuration I hope that attaching the file will give you something to look at to help me get this going I feel like we are really close to getting this thing off and running.

Thanks,

Jeremy
You do not have the required permissions to view the files attached to this post.
elrod121
Posts: 7
Joined: Thu Apr 19, 2012 1:27 am

Re: Deleting Hosts

Post by elrod121 »

Scott,

Here is the error log output after the changes the Juniper MX-960 is a large device it has around 1K logical and physical interfaces I don't seem to have a problem adding other devices at the moment.

Thanks,

Jeremy



Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/cr1.nsvltnit.iristransport.net.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/lo-0.cr1.nsvltnit.iristransport.net.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/cr1.nsvltnit.iristransport.net.cfg'...
Processing object config file '/usr/local/nagios/etc/services/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/services/lo-0.cr1.nsvltnit.iristransport.net.cfg'...
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/cr1.nsvltnit.iristransport.net.cfg', starting on line 366)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Deleting Hosts

Post by scottwilkerson »

It all comes down to this
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/cr1.nsvltnit.iristransport.net.cfg', starting on line 366)
One of the services you are adding is likely missing the service description (name) field.

You may need to login to the CCM go to Services and select the cr1.nsvltnit.iristransport.net.cfg from the Config name filter:

verify none are missing the required elements listed above.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart