Hi Marc,<div><br></div><div>Thanks for your response. What can you suggest for this kind of scenario as my boss requirement is to have the nagios logs remain within 6 months only?</div><div><br></div><div>At this moment, I just set "log_rotation_method=n" in nagios.cfg and I made simple logrotation script as stated below.</div>
<div><br></div><div>/var/logrotation.d/nagios:</div><div><br></div><div><div>/var/log/nagios/*log {</div><div>daily</div><div>rotate 180</div><div>compress</div><div>dateext</div><div>missingok</div><div>notifempty</div><div>
olddir /var/log/nagios/archives</div><div>sharedscripts</div><div>postrotate</div><div>        /sbin/service nagios reload > /dev/null 2>/dev/null || true</div><div>endscript</div><div>}</div><div><br></div>Would appreciate your help about this.</div>
<div><br></div><div>Thanks.</div><div><br></div><div>Regards,</div><div>James</div><div><br><div class="gmail_quote">On Sat, Jun 5, 2010 at 8:45 PM, Marc Powell <span dir="ltr"><<a href="mailto:lists@xodus.org">lists@xodus.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
On Jun 5, 2010, at 3:57 AM, James Corteciano wrote:<br>
<br>
> Dear List,<br>
><br>
> I am running Nagios version 3.2.0 and the archive logs are located in /var/log/nagios/archive which doing log rotation everyday. How can I configure nagios that the archive logs retention period is six (6) months?<br>

<br>
</div>There isn't a configuration option for this. Nagios will keep the log files indefinitely for reporting (you can go back 2+ years through the web interface).<br>
<br>
You can cron a simple find -exec rm to do that but be aware that you won't have any reporting capability beyond what you keep.<br>
<br>
Also, because you specifically mention it, using logrotate will break reporting in nagios. The file naming convention must be exact for nagios to find the files.<br>
<br>
--<br>
Marc<br>
<br>
<br>
------------------------------------------------------------------------------<br>
ThinkGeek and WIRED's GeekDad team up for the Ultimate<br>
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the<br>
lucky parental unit.  See the prize list and enter to win:<br>
<a href="http://p.sf.net/sfu/thinkgeek-promo" target="_blank">http://p.sf.net/sfu/thinkgeek-promo</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>