Parsing Compressed Log Files In CGIs
Andreas Ericsson
ae at op5.se
Wed Jul 23 08:57:41 CEST 2008
Caylan Van Larson wrote:
> Andreas Ericsson wrote:
>
>> Caylan Van Larson wrote:
>>
>>> log_notifications=1
>>> log_service_retries=1
>>> log_host_retries=1
>>> log_event_handlers=1
>>> log_initial_states=0
>>> log_external_commands=1
>>> log_passive_checks=1
>>>
>>> Looking at these I'm wondering if I need any of these for the CGIs to
>>> be effective in reporting...
>> log_initial_states can be important, depending on your report
>> settings.
>> Assuming you don't restart Nagios all that often, it'll barely show on
>> the disk usage.
>
> Even though log_initial_states is set to 0 I'm still seeing CURRENT
> HOST/SERVICE STATE entries on log rotation.
>
That's normal. It's there so as to be able to drop the "assume initial
state" and "backtracked archives" from the UI eventually, although that
will also require a tool to parse it from older logfiles and insert it
into newer ones.
If you don't care about reports, you could disable that, but it would
require patching the nagios core to do so.
> [1216702800] LOG ROTATION: DAILY
> [1216702800] LOG VERSION: 2.0
> [1216702800] CURRENT HOST STATE: hostname;UP;HARD;1;PING OK - Packet
> loss = 0%, RTA = 32.58 ms
>
> This data makes up the bulk of our nagios.log this morning: 495K out
> of 550K (a far cry from the 20M we were seeing before I disabled a few
> log_ events above).
>
> If I understand correctly log_initial_states will do another one of
> these "CURRENT STATE" dumps after each reload, effectively growing
> logs by 500K each time?
>
Yes, that's correct. Assuming you are using state retention, ofcourse.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
More information about the Developers
mailing list