[syslog-ng] [review request] 3.6queue/f/stats-reset

Gergely Nagy algernon at balabit.hu
Mon Nov 18 12:22:57 CET 2013


Balazs Scheidler <bazsi at balabit.hu> writes:

> User-visible changes:
> =====================
>
> syslog-ng is keeping track on a number of statistics counters that can
> be used to track what is happening.
>
> The detail level of these counters is controlled by the stats-level()
> global option, which defaults to zero.
>
> syslog-ng reports these counters periodically every stats-freq()
> seconds, or preferably on-demand by invoking "syslog-ng-ctl stats" on
> the command line.
>
> At stats-level(3) a number of "dynamic" counters are enabled, which
> track the number of messages on a per $HOST, per $PROGRAM and per
> $HOST_FROM basis. This means that you can follow how many messages a
> given $PROGRAM is generating in a period.
>
> The issue with dynamic counters is that they can consume a lot of memory
> if  the rate of new $PRORGRAM/$HOST values is high.
>
> Previously the cleanup happened in a limited way at configuration reload
> (e.g. SIGHUP) time, which is not really useful for controlling memory
> usage by this feature.
>
> The current patch series introduces a stats-lifetime() option and
> syslog-ng starts inspecting counters every once in a while and prune
> those that are updated earlier than stats-lifetime().

So, this means that if I don't query the stats just before clearing,
I'll potentially loose information? I mean, considering stats-freq(60)
stats-lifetime(10), if I have a source that has messages available every
14 seconds, I'll loose some of  them.

Would it be possible to dump the stats just before forgetting them?
Even better, dump only the ones we're about to prune out. That'd make
things a bit safer, I think.

-- 
|8]



More information about the syslog-ng mailing list