<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div><br></div><div>If desired, could a "zero-counters" be added to syslog-ng-ctl ?</div><div><br></div><div>Not critical but maybe useful for troubleshooting.&nbsp;</div><div><br></div><div>Jim</div><div><br></div><div><div style="font-size:75%;color:#575757">Sent from my Verizon Wireless 4G LTE Smartphone</div></div> <br><br><br>-------- Original message --------<br>From: Gergely Nagy &lt;algernon@balabit.hu&gt; <br>Date: 11/20/2013  8:47 AM  (GMT-05:00) <br>To: Syslog-ng users' and developers' mailing list &lt;syslog-ng@lists.balabit.hu&gt; <br>Cc: syslog-ng-dev-l@balabit.hu <br>Subject: Re: [syslog-ng] [review request] 3.6queue/f/stats-reset <br> <br><br>Balazs Scheidler &lt;bazsi77@gmail.com&gt; writes:<br><br>&gt; On Mon, 2013-11-18 at 18:22 +0100, Gergely Nagy wrote:<br>&gt;&gt; Evan Rempel &lt;erempel@uvic.ca&gt; writes:<br>&gt;&gt; <br>&gt;&gt; &gt; Perhaps the same logic can be used to identify those counters that have expired meaning that the stats-lifetime() has been exceeded,but<br>&gt;&gt; &gt; instead of dropping the stat counter at that time, the counter is just flagged for dropping.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Then it becomes the job of the statistics logging, based on the stats-freq() value, to log AND drop those counters that<br>&gt;&gt; &gt; have been flagged as having exceeded the stats-lifetime().<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; This way a counter is never dropped until it has exceeded the<br>&gt;&gt; &gt; stats-lifetime() AND has been logged.<br>&gt;&gt; <br>&gt;&gt; That makes a lot of sense, but syslog-ng-ctl stats should not count (or<br>&gt;&gt; perhaps only with a flag), precisely to avoid the scenario you outlined<br>&gt;&gt; too.<br>&gt;&gt; <br>&gt;<br>&gt; This really makes sense, however my issue is that stats-freq() is often<br>&gt; set to 0 which disables the Log statistics message currently. Relying<br>&gt; the cleanup mechanism on that would disable cleanup altogether in a lot<br>&gt; of setups.<br>&gt;<br>&gt; hmm... maybe we should use stats-freq() if that's nonzero and<br>&gt; stats-lifetime() when it is zero. This way the cleanup mechanism would<br>&gt; kick in, without the risk of losing messages.<br>&gt;<br>&gt; syslog-ng-ctl stats wouldn't prune counters.<br>&gt;<br>&gt; This way, stats-freq() would be the one which actually clears counters,<br>&gt; we get rid of an additional iteration over the set of counters.<br>&gt;<br>&gt; This paves the way for an improved log statistics message that could be<br>&gt; sent into graphite/logstash/whatever graphing application via standard<br>&gt; syslog-ng destination drivers, and all this without the risk of losing<br>&gt; counters.<br>&gt;<br>&gt; What do you think?<br><br>Sounds very good to me. This is a big step towards what I need, and is<br>simple enough to understand too.<br><br>-- <br>|8]<br><br>______________________________________________________________________________<br>Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng<br>Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng<br>FAQ: http://www.balabit.com/wiki/syslog-ng-faq<br><br></body>