automating deletions of hosts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

automating deletions of hosts

Post by paul.jobb »

Is there a method for doing bulk deletions of hosts that can be automated?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: automating deletions of hosts

Post by scottwilkerson »

There is no automated bulk delete of hosts in XI at this time.

Is this something you will need to do frequently?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: automating deletions of hosts

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

Re: automating deletions of hosts

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: automating deletions of hosts

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

Re: automating deletions of hosts

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked