<div dir="ltr">Daniel: can you share what are you using stats for? Maybe some interesting aggregations?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 8, 2013 at 2:20 PM, Daniel Neubacher <span dir="ltr">&lt;<a href="mailto:daniel.neubacher@xing.com" target="_blank">daniel.neubacher@xing.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div bgcolor="#FFFFFF">
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Thanks for the answer. Thats what i needed to know. And now I now that the nc of the server is too old, no -U option :P
<div><br>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000"><b>Von:</b> <a href="mailto:syslog-ng-bounces@lists.balabit.hu" target="_blank">syslog-ng-bounces@lists.balabit.hu</a> [<a href="mailto:syslog-ng-bounces@lists.balabit.hu" target="_blank">syslog-ng-bounces@lists.balabit.hu</a>]&quot; im Auftrag von &quot;Balint Kovacs [<a href="mailto:balint.kovacs@balabit.com" target="_blank">balint.kovacs@balabit.com</a>]<br>


<b>Gesendet:</b> Dienstag, 8. Januar 2013 11:09<br>
<b>An:</b> <a href="mailto:syslog-ng@lists.balabit.hu" target="_blank">syslog-ng@lists.balabit.hu</a><br>
<b>Betreff:</b> Re: [syslog-ng] getting syslog stats without syslog-ng-ctl?<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div>Hi,<br>
<br>
it is quite easy, all that syslog-ng-ctl does is that it writes &quot;STATS\n&quot; into the syslog-ng control socket and displays the result. I&#39;m not familiar with ruby, but I assume that basic Unix domain socket read/write is not that hard to do with it. With the use
 of netcat you can check that<br>
<br>
<tt>root@lyra:~# nc -U /var/lib/syslog-ng/syslog-ng.ctl</tt><tt><br>
</tt><tt>STATS</tt><tt><br>
</tt><tt>SourceName;SourceId;SourceInstance;State;Type;Number</tt><tt><br>
</tt><tt>center;;received;a;processed;0</tt><tt><br>
</tt><tt>destination;d_messages;;a;processed;751</tt><tt><br>
</tt><tt>src.internal;s_src#2;;a;processed;9</tt><tt><br>
</tt><tt>src.internal;s_src#2;;a;stamp;1357639178</tt><tt><br>
</tt><tt>destination;d_console_all;;a;processed;553</tt><tt><br>
</tt><tt>center;;queued;a;processed;0</tt><tt><br>
</tt><tt>destination;d_console;;a;processed;56</tt><tt><br>
</tt><tt>destination;d_xconsole;;a;processed;553</tt><tt><br>
</tt><tt>global;payload_reallocs;;a;processed;424</tt><tt><br>
</tt><tt>global;sdata_updates;;a;processed;0</tt><tt><br>
</tt><tt>global;msg_clones;;a;processed;0</tt><tt><br>
</tt><tt>source;s_src;;a;processed;7666</tt><tt><br>
</tt><tt>.</tt><tt><br>
</tt><tt>^C</tt><br>
<br>
Balint<br>
<br>
</div>
<blockquote type="cite">
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hello there,
<div>we are plotting and monitoring lot of data and for this I&#39;m using a little bash script which does sum up the output of syslog-ng-ctl. But this is kind of slow with 17k lines to parse :P</div>
<div>Is there a way to get the stats directly without syslog-ng-ctl? My goal is to write a ruby script which only parse the stats i&#39;m needing. </div>
<div><br>
</div>
<div>I&#39;m no developer so please answer admin friendly :)</div>
</div>
<br>
<fieldset></fieldset> <br>
<pre>______________________________________________________________________________
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a>

</pre>
</blockquote>
<br>
</div>
</div></div></div>
</div>
</div>

</div>

<br>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards,<br>Koldaev Anton
</div>