> Is there anyway in Nagios to define services at runtime? I'll give an
> example:
>
> You have a script that monitors ports on a switch for errors. When its run
> it walks the interface error counters on the switch. For each port it
> discovers it creates a new service entry (for this host/switch) - if one
> does not already exist - and then sets the state accordingly.
The example works better if you continually have devices becoming
available (eg, via zero-conf), being on for a while, then disconnecting,
for example in a device testing environment.
Telling a running Nagios about a new service check doesn't seem possible.
The closest that I've gotten is to automagically regenerate the nagios
configuration files based on templates at conditional intervals; ie, a
machine being added to the database and Nagios starts monitoring it in the
next 10 minutes thanks to the generate script noticing a database change.
> check ran (instead of one service check per-port). I can envisage a single
> plug-in, which only needs to be given a hostname and community string to
> able to generate individual reports for each switchport for errors,
> queuedrops and port status.
Sounds like what you want (after generating the configuration) is a single
active service check which, when run by nagios, supplies passive check
results for a lot of other service checks (thus inhibiting the Nagios
execution of those specific checks).
> ------=_NextPart_000_0010_01C67413.EEDA4380
> Content-Type: text/html;
A single part of text/plain works much better for technical mailing lists.
You don't end up with old farts complaining about the waste of bytes for
one
--
Bruce Campbell
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]