Nagios Contribution
Ethan Galstad
nagios at nagios.org
Sat Nov 26 04:55:44 CET 2005
Thanks for the patches Stephan - I've finally gotten around to
committing them to CVS. The one change I did make had to do with the
additional NEB event type. Instead of creating a new event type, I
simply used the NEBTYPE_TIMEDEVENT_SLEEP event type, which had not
yet been implemented.
On 19 Sep 2005 at 11:04, "Pötschner, Stephan" wrote:
>
> Hi Ethan, hi community.
>
> I am currently working on a Nagios module and I´d like to add some
> comments and code.
> But first of all I´d like to thank you for this great software, you
> chose to distribute as open source.
>
> *) The project - I´ve already mentioned - is based on C++ code and it
> would be really nice, if all Nagios header file would be guarded by a
> conditional `extern "C"´ statement. This way one can use every Nagios
> function in its module code, just add the appropriate headerfile and
> compile the code even with c++ compilers without any problems.
> I´ve already added this directive to your header files and created a
> diff-file out of the code (`patch_include´)
>
> *) The second thing I would consider as rather helpful, would be an
> additional event, which fires if both queues - high and low priority -
> are empty and Nagios plans to change into idle mode (sleeping for
> `sleep_time´ seconds). This feature would be really nice, since one
> could add additional customized tasks or analysis using the NEB
> interface.
> I´ve therefore added an additional eventtype:
> `NEBTYPE_PROGRAMSTATUS_EMPTYQUEUES´
> And a few lines of code in `events.c´. Like the original code, first
> the high priority event queue will be checked, if it´s empty the low
> priority queue will be checked, if it´s empty, the
> `NEBTYPE_PROGRAMSTATUS_EMPTYQUEUES´ event will be fired, so modules
> can do some additional work. Then the check for external commands
> will be executed and at last - if in the meantime no other event
> reached its deadline - Nagios may sleep for some time.
> I´ve got one question concerning this context: in "events.c" line
> 906: when will this condition fire (or will this condition ever
> fire), since the service reaper event or the log rotation event
> should be in the queue, even if there are no active services.
>
> *) I´d also appreciate, if one could add services that are disabled
> by default and may be executed by NEB modules if needed. I thought of
> using the `normal_check_interval´-parameter for this function, since
> your code already seems to catch services with interval `0´ after
> they got executed and disables them again.
> This would be very helpful for my project, because my module wants to
> add from time to time an additional service which is supposed to be
> executed exactly one time by nagios and then should be suspended
> again. Therefore I just had to change the sanity check in `objects.c´
> to accept intervals with a value set to 0 and did some minor
> additional changes to ensure that this service will be disabled
> again.
>
> I hope you consider my comments as helpful and accept to add them to
> the community release, since I consider your module architecture as a
> very powerful and dynamic method to add new features and would really
> like to use it in my project the way I described.
>
> If you think I could add these features in a better way, please don´t
> hesitate to comment on them - I will be glad on any comments in
> general.
> The tgz-archive contains 3 files. One for every folder I added code
> to (patch_base -> ./base, patch_common -> ./common, patch_include ->
> ./include).
>
> Best regards,
> Stephan Pötschner
> Research & Development
> Fabalabs Software GmbH
> Honauerstraße 4
> A-4020 Linz
> Tel.: [+43] (70) 60 61 62
> Fax: [+43] (70) 60 61 62-609
> E-Mail: stephan.poetschner at fabalabs.org
> Web: http://www.fabalabs.org
>
>
>
Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
More information about the Developers
mailing list