Hi everybody,<div><br></div><div>This is the first time I'm posting on this mailing list, so I'm sorry if my question was already discussed here - I tried to find information about it on the mailing list and also on Nagios documentation + googling, but couldn't find it.</div>

<div><br></div><div>Well, I'm setting up Nagios to monitor a group of servers in a cloud environment. I decided to use passive checks, so I will have one Nagios central monitor and all servers push statistics to Nagios using NSCA. Everything is OK so far.</div>

<div><br></div><div>The problem is that I want to add and remove instances dynamically, I don't want to manually modify hosts.cfg on the central each time I change my infrastructure. So my idea was that when a new instance gets up, it will send to Nagios something like (always using NSCA):</div>

<div><br></div><div>"localhost     Server UP     0     <new instance IP>"</div><div><br></div><div>On Nagios I would create a new service on localhost to handle this passive check.</div><div>I've created a Python script (that uses pynag) to modify the hosts.cfg file in order to add and remove host definitions. When Nagios receives this passive check, I would call the script to modify the hosts definition files, and a cron job would execute every minute to look for modifications on hosts.cfg and make Nagios reload the definition files.</div>

<div><br></div><div>My doubts are:</div><div>- is there a smarter way to do that (dynamically add and remove hosts from Nagios)?</div><div>- since my "Server UP" service uses passive checks only, how do I make Nagios call my script to modify hosts.cfg every time it receives the passive check?</div>

<div><br></div><div>Any thoughts/suggestions would be appreciated. :)</div><div><br></div><div>Thank you in advance,</div><div>Best regards,<br clear="all"><font><div><font><br></font></div><div><font>--</font></div>   </font><font>Felipe Cecagno</font><div>

   Mconf Development Team</div><div>   <a href="https://mconf.org/" target="_blank">https://mconf.org</a></div><br>
</div>