Bulk host deletion

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Bulk host deletion

Post 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!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Bulk host deletion

Post 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
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Bulk host deletion

Post 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.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Bulk host deletion

Post 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
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Bulk host deletion

Post 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?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Bulk host deletion

Post 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.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Bulk host deletion

Post 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)
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Bulk host deletion

Post 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.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Bulk host deletion

Post by benhank »

thanks man! you can close this topic.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Locked