Adding host & services while Nagios daemon is running
bobi at netshel.net
bobi at netshel.net
Fri Apr 20 20:38:04 CEST 2007
Hi,
FWIW:
To be honest with you, the only ways that I know to add objects or events
into Nagios 2.x dynamically (without modifying the core,) would be:
1. Writing to the Command Pipe or,
2. Writing an NEB module.
As far as adding new hosts or services, I don't think that that can be
done via the Command Pipe, so I'm guessing that a NEB module might be the
only way. (This only applies to Nagios 2.x - not sure about 3.x)
The reason is that in order to add host and services to the in-core data
structures, you have to be in the memory space of the core. And the way
to do this without modifyig the core (that I know of,) is to write a NEB
module.
One of the ways that I've done this is to write a NEB module that creates
a new thread at initialization time, and then this thread can read object
create/delete command from it's own pipe. This would allow you to
add/delete hosts and/or services on the fly without necessarily degrading
Nagios performance.
I used a similar technique for creating clusters of "check nodes" -
dnx.sf.net.
Hope this helps.
Bob
> Hi guys,
> Im 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?
> Best regards,
>
> Sebastian Ganame
>
>
>
> ---------------------------------
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> Probalo ya!
> -------------------------------------------------------------------------
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/_______________________________________________
Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
-------------------------------------------------------------------------
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/
More information about the Developers
mailing list