Page 1 of 1
Bulk host deletion
Posted: Mon Aug 06, 2012 11:32 am
by benhank
I was given a list of about 400+ hosts to add to nagios.
I used the Bulk host import wiz, But after I hit "apply config" I got an error:
Code: Select all
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/xxx.cfg', starting on line 14)
Error processing object config files!
i looked up the server/services and all options were synced.
I checked out the : Service description, host name and check command, nothing was listed as null
exasperated, I tried to delete the host, and hit apply config. The same error came up with the next server on my list... you can see where i am going with this, lol.
Is there a way to do the bulk host import wizard in reverse and delete bulk hosts?
Or how can I delete these 400+ hosts and there services?
thanks in advance!
Re: Bulk host deletion
Posted: Mon Aug 06, 2012 11:40 am
by yancy
benhank,
Did you upload a csv file to the Bulk host import wiz? What deliminator are you using in the CSV file?
Regards,
-Yancy
Re: Bulk host deletion
Posted: Mon Aug 06, 2012 11:58 am
by benhank
I know how I set it up but could you detail for me how I should answer that?
Sometime I have trouble making sense.
Re: Bulk host deletion
Posted: Mon Aug 06, 2012 12:18 pm
by yancy
benhank,
No problem, just wanted to verify you where using commas to separate your values.
have you looked through this document
http://assets.nagios.com/downloads/nagi ... _Usage.pdf
regards,
-Yancy
Re: Bulk host deletion
Posted: Tue Aug 07, 2012 9:39 am
by benhank
sorry for the delay, yes I import hosts following that format. I think I should just delete them somehow, unless you know of a better way to fix this (I hope). Is there a way to delete them from the command line?
Re: Bulk host deletion
Posted: Tue Aug 07, 2012 12:33 pm
by mguthrie
Code: Select all
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/xxx.cfg', starting on line 14)
Can you access the Core Config Manager->Services page and locate the service with the Config Name "xxx" from above. Start by deleting this and seeing if you can Apply Configuration. Also, do you have any host or service entries that appear to be blank when you access the set of host listings and service listings? If so, delete them.
Re: Bulk host deletion
Posted: Tue Aug 07, 2012 1:22 pm
by benhank
the problem is I have 400 hosts with 5 service checks for each. when I delete the services associated with xxx server no 1 then the next server on my import list errors out. I was hoping I could do a mass delete of the hosts \services that I imported. Otherwise i am gonna be a clickin my life away ... lol (i laugh thru the pain)
Re: Bulk host deletion
Posted: Tue Aug 07, 2012 2:03 pm
by mguthrie
I would grab our new CCM beta and do Bulk deletion that way, this can be installed through the Admin->Manage Components page. I'm a little bit uncomfortable suggesting blanket deletion SQL queries if you have other items on there.
http://assets.nagios.com/downloads/exch ... cm/ccm.zip
The new CCM will allow you to show up to 250 items at once, check all, and delete. It will also give more human readable error and information messages to help debug.
Re: Bulk host deletion
Posted: Tue Aug 07, 2012 3:27 pm
by benhank
thanks man! you can close this topic.