Page 1 of 1

Automatic Provisioning

Posted: Wed Oct 19, 2011 6:32 am
by srrhd
Hi,

We are trying to automate the NagiosXI provisioning from our information system. Adding hosts and services works perfectly. (If someone need to know how, just copy your new configuration files into /usr/local/nagios/etc/import and then run /usr/local/nagiosxi/scripts/reconfigure_nagios.sh)

Now the question that comes up is how the automate the deletion of hosts or services ? Do you have a script that could do that ?

If no, the solution would be to update the configuration file to set REGISTER to 0. But then we will need to manually delete them from the web interface and as human action often means mistake or forgottenness, i would prefer something more efficient.

Thanks.

Re: Automatic Provisioning

Posted: Wed Oct 19, 2011 11:19 am
by nscott
srrhd,

Have you considered using the static directory, and just bypass the frontend NagiosQL all together. For what you're doing, I think NagiosQL will just get in your way.

If you used the static directory, you could just generate the config file, then place it in the static directory and added or removed at will. Check out this doc to see if its what you were thinking:

http://assets.nagios.com/downloads/nagi ... _Files.pdf

Re: Automatic Provisioning

Posted: Thu Oct 20, 2011 6:27 am
by srrhd
Hi Nicholas,

Thanks for the tip, it's just what we needed !

Re: Automatic Provisioning

Posted: Thu Oct 20, 2011 11:15 am
by nscott
Awesome, glad that works for you!