Adding host & services while Nagios daemon is running

Thomas Guyot-Sionnest Thomas at zango.com
Fri Apr 20 20:03:12 CEST 2007


> -----Original Message-----
> From: nagios-devel-bounces at lists.sourceforge.net 
> [mailto:nagios-devel-bounces at lists.sourceforge.net] On Behalf 
> Of Sebastian Ganame
> Sent: April 20, 2007 13:50
> To: nagios-devel at lists.sourceforge.net
> Subject: [Nagios-devel] Adding host & services while Nagios 
> daemon is running
> 
> Hi guys,
> I'm trying to use Nagios to monitor a Grid environment. As 
> you know, a Grid is highly dynamic, with new hosts coming in 
> and out of the scope that I need to monitor.
> So, what I would need is to add new hosts (and maybe new 
> services) to be monitored while Nagios is running.
> Taking a look into NEB documentation, I've seen that 
> disregarding this is a read-only (or subscribe only in a 
> pub-sub terminology) you can use Nagios core engine 
> addservice() function call within a callback and before 
> giving control back to Nagios.
> I was wondering if it's possible (without modifying current 
> Nagios engine implementation) to define new hosts to be 
> monitored as well as new services on those hosts without 
> restarting Nagios daemon. Is this possible in any other 
> fashion that is not thru the NEB callbacks?

I don't think there's an easy way without heavy modifications to Nagios. If
you must you could restart the daemon every time you add/remove hosts. It's
a fairly fast operation, just make sure you have a minimum restart interval
just in case.

Though, if you know which hosts can be there I'd just add them all and
activate/deactivate active checks on the host you want/don't want to be
monitored.

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3076 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20070420/9005972d/attachment.bin>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list