<div dir="ltr"><br>Mark, thanks a lot for this explanation and the hints. I think I'll have a look at the event broker thing. <br><br>thanks!<br>Karl<br><div class="gmail_quote">On Mon, Sep 8, 2008 at 5:39 PM, Marc Powell <span dir="ltr"><<a href="mailto:marc@ena.com">marc@ena.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
On Sep 8, 2008, at 9:59 AM, K-L Reinhard wrote:<br>
<br>
> Hi,<br>
><br>
> I'm really unexpierenced with nagios but I have the following task.<br>
> We have to fire on a script, after the internal logrotating of<br>
> nagios is done. I know, it would be a lot simpler if we use lograte,<br>
> but we don't -.-.<br>
<br>
</div>... and shouldn't. Using logrotate will break nagios reporting<br>
capabilities.<br>
<div class="Ih2E3d"><br>
> Is there a way to solve this matter with an event handler or is it<br>
> possible to define a postscript? Maybe there's a way to call the<br>
> logrotate function manually ?<br>
<br>
</div>Yes to the first, but not trivially and not as an event handler, no to<br>
the second and no to the third (can't be done and it would break<br>
nagios reporting capabilities). It's an unusual request so there<br>
aren't any easy-to-use capabilities... Nagios doesn't provide an event<br>
handler type of action for log rotation but _does_ notify event broker<br>
modules of the log rotation event (EVENT_LOG_ROTATION, I believe). You<br>
could write an event broker module that listens for that event and<br>
takes appropriate action. Alternately, nagios does log the rotation<br>
event to nagios.log as 'LOG ROTATION:'. You could maintain a<br>
continuous tail of the file looking for a sudden decrease in the log<br>
file size, inode change and/or that entry and take appropriate action.<br>
<br>
--<br>
Marc<br>
<br>
<br>
-------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>
Build the coolest Linux based applications with Moblin SDK & win great prizes<br>
Grand prize is a trip for two to an Open Source event anywhere in the world<br>
<a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</blockquote></div><br></div>