To automatically add new hosts
Posted: Thu Nov 15, 2012 2:43 pm
Hello - my company is planning on using AWS auto-scaling. We use Chef recipes to help configure new instances and I am looking at how to best craft a recipe to automatically add new instances to Nagios XI.
So far I have found this document:
http://assets.nagios.com/downloads/nagi ... gement.pdf
And I believe I can script around what is described there for adding new hosts via Chef. What I like about this method is that the hosts can then be easily removed from XI programatically without XI complaining about any dependencies with just one command as all of its services live in one place. With auto-scaling in particular we will need a scripted method for instances to remove themselves from XI to prevent false alarms.
However, we also wanted to leverage hostgroups as a way of adding in new systems for a number of reasons. One was to keep the number of services we have in XI trim/scalable. Also we want to be able to easily change a monitoring service config setting and have it automatically apply to all hosts in a hostgroup. If we add all of our hosts via the method described in the "Automated Host Management" doc it will make them more difficult to manage them as we'd have to change settings for every host rather than for just one service.
So I am wondering what other command line options are available with XI? Is there any way to add/remove a host to a hostgroup via the command line?
So far I have found this document:
http://assets.nagios.com/downloads/nagi ... gement.pdf
And I believe I can script around what is described there for adding new hosts via Chef. What I like about this method is that the hosts can then be easily removed from XI programatically without XI complaining about any dependencies with just one command as all of its services live in one place. With auto-scaling in particular we will need a scripted method for instances to remove themselves from XI to prevent false alarms.
However, we also wanted to leverage hostgroups as a way of adding in new systems for a number of reasons. One was to keep the number of services we have in XI trim/scalable. Also we want to be able to easily change a monitoring service config setting and have it automatically apply to all hosts in a hostgroup. If we add all of our hosts via the method described in the "Automated Host Management" doc it will make them more difficult to manage them as we'd have to change settings for every host rather than for just one service.
So I am wondering what other command line options are available with XI? Is there any way to add/remove a host to a hostgroup via the command line?