Page 1 of 1
automating deletions of hosts
Posted: Fri Feb 17, 2012 1:17 pm
by paul.jobb
Is there a method for doing bulk deletions of hosts that can be automated?
Re: automating deletions of hosts
Posted: Fri Feb 17, 2012 1:38 pm
by scottwilkerson
There is no automated bulk delete of hosts in XI at this time.
Is this something you will need to do frequently?
Re: automating deletions of hosts
Posted: Fri Feb 17, 2012 3:56 pm
by paul.jobb
We have approximately 2000 hosts, of which over half of those are now virtualized. Virtual machines are rather easy to build as needed, with the thought of autoprovisioning those machines at some point, therefore I am looking for a way to automate additions and subtractions.
Re: automating deletions of hosts
Posted: Fri Feb 17, 2012 4:13 pm
by scottwilkerson
You'd have to think this through for these, but you could write some kind of script that would write cfg files for these hosts to
/usr/local/nagios/etc/static
directory then run
service nagios restart
Then to delete the host/services you could just delete the cfg and restart nagios
Re: automating deletions of hosts
Posted: Fri Feb 17, 2012 4:24 pm
by paul.jobb
I thought I read in a post elsewhere that cfg's written to the static folder couldn't be managed via the xi interface, is that the case?
Re: automating deletions of hosts
Posted: Fri Feb 17, 2012 4:44 pm
by scottwilkerson
That is correct, they cannot be modified or changed in XI, but they can be seen in the interface.
I just wanted to give you an option, and also why I mentioned you'd want to think the setup of these through.