<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
I believe you are looking for a logrotate functionality. Please correct me if I am wrong.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
There was a question in 2012 about it, let me give you a link to the answer:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<a href="https://lists.balabit.hu/pipermail/syslog-ng/2012-April/018683.html" style="">https://lists.balabit.hu/pipermail/syslog-ng/2012-April/018683.html</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Another thread about logrotate: <a href="https://github.com/syslog-ng/syslog-ng/pull/2798#issuecomment-553398341" style="" id="LPNoLP636620">https://github.com/syslog-ng/syslog-ng/pull/2798#issuecomment-553398341</a></div>
<br>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
You can add "compress" to the logrotate script, to run gzip on it.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Although the logrotate config above is based on the size of the file, is that suitable for you?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Attila</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> syslog-ng <syslog-ng-bounces@lists.balabit.hu> on behalf of William Luiz Ribeiro Vasconcelos Da Silva <wsilva_ericsson@timbrasil.com.br><br>
<b>Sent:</b> Wednesday, December 4, 2019 1:06 PM<br>
<b>To:</b> syslog-ng@lists.balabit.hu <syslog-ng@lists.balabit.hu><br>
<b>Subject:</b> Re: [syslog-ng] How to syslog-ng execute shell script</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="background-color:#FFEB9C; width:100%; border-style:solid; border-color:#9C6500; border-width:1pt; padding:2pt; font-size:10pt; line-height:12pt; font-family:'Calibri'; color:Black; text-align:left">
<span style="color:#9C6500; font-weight:bold">CAUTION:</span> This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.</div>
<br>
<div>
<div>
<div id="x_appendonsend" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Attila,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>My goal is after the file generation by syslog-ng. Call a script to concatenate files in 1000 lines and after running gzip.<br>
</span><span>Because the system that will collect these files expects the files to always be "zipped" and suffixed with .gzip</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>Regards,</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>William</span></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>De:</b> syslog-ng <syslog-ng-bounces@lists.balabit.hu> em nome de Attila Szakacs (aszakacs) <Attila.Szakacs@oneidentity.com><br>
<b>Enviado:</b> quarta-feira, 4 de dezembro de 2019 06:24<br>
<b>Para:</b> syslog-ng@lists.balabit.hu <syslog-ng@lists.balabit.hu><br>
<b>Assunto:</b> Re: [syslog-ng] How to syslog-ng execute shell script</font>
<div> </div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Hi William,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Yes it is possible:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
program source: <a href="https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.syslog-ng.com%2Ftechnical-documents%2Fdoc%2Fsyslog-ng-open-source-edition%2F3.24%2Fadministration-guide%2F23%23TOPIC-1297952&data=02%7C01%7Cattila.szakacs%40oneidentity.com%7Cb1aadada26af41352efd08d778b2682d%7C91c369b51c9e439c989c1867ec606603%7C0%7C0%7C637110580032260110&sdata=nMqPimY2F0EK0RzTohtNOfyFIqKqVpubg9Hf4c2wZlg%3D&reserved=0" originalsrc="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/23#TOPIC-1297952" shash="UY92qhfaH89QuSTF3FqY3p4I+ASSrODDabwI5Zbh/g2KgzsbeeamMuWcD6qLsDNeTDAjnAWP1ooRB0vQcHexAiWuM4IkLhfuNv0nCV8OCNvWa0/pjbNOcdcQJkcwc3pt5ZI9Z4b4YJeoFQqJ+H4v7hG3inAt3qaUoV5FJHyFStk=" originalsrc="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/23#TOPIC-1297952" shash="jmmdn6tWmAScD3/SUfkZZQcGQmDMs3AkFCsWeLAZbfAHysS1Dryj/q5JyzA9kOn5eRZlD/w7pnHXOltMuNy473AU1hsKXEYoNWR2mE7CYoatxYgy1hhPb7/+M/uacMQq3aDyjlQ7ED+45hTyE/+WDNT2CjHc/daYf62o428YoY0=" id="LPNoLP835105" style="">https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/23#TOPIC-1297952</a></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
program destination: <a href="https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.syslog-ng.com%2Ftechnical-documents%2Fdoc%2Fsyslog-ng-open-source-edition%2F3.24%2Fadministration-guide%2F43%23TOPIC-1298032&data=02%7C01%7Cattila.szakacs%40oneidentity.com%7Cb1aadada26af41352efd08d778b2682d%7C91c369b51c9e439c989c1867ec606603%7C0%7C0%7C637110580032270109&sdata=b90Xd8lyc%2BwbDwl6qf0N9pQONXbSRocbDnVXOGGFqds%3D&reserved=0" originalsrc="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/43#TOPIC-1298032" shash="wJNp6xmJDLDNWs8l9I+2aCT17y0QnYaPKqRC6fBdfs8nOWJ2+FZwrcVRPui/dvTYm6dYGY1Fgm9GA53XRiimWKPDSwkiNN30DsdlXwIklKyX+pi9bzqCCSaAdHDAGOFhDr9X1elyF95oYUeyZmtzzrWO/6iGBTa8IRX9qpdzCO0=" originalsrc="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/43#TOPIC-1298032" shash="XevYcnZB1VDBa9a4ixdVoQv5RE/ap76zNzIPjp2Iqa4ExYbyvXDdFi+C8kzG4EoyLkT6b8NxgVWW/fzx/BuZ9SZ/v3nj+NVGKWRYoqQGXiQ05UoprOTLJ9XYqQxXShVNhlCEllbYdPsdXKOAusqKFKFm43fIzDNWWseOqENjxlo=" style="">https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/43#TOPIC-1298032</a></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
hook-commands (for all sources and drivers with a few exceptions): <a href="https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.syslog-ng.com%2Ftechnical-documents%2Fdoc%2Fsyslog-ng-open-source-edition%2F3.24%2Fadministration-guide%2Fhook-commands&data=02%7C01%7Cattila.szakacs%40oneidentity.com%7Cb1aadada26af41352efd08d778b2682d%7C91c369b51c9e439c989c1867ec606603%7C0%7C0%7C637110580032280100&sdata=%2FcDSd%2BOFLYFfM%2BwzWz%2FY2u2AxSJamx2GHi4jsuIlte0%3D&reserved=0" originalsrc="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/hook-commands" shash="bxkmyk49JZzdT+2dVkpOylABO1rSRtMoKIsDruWG+s9IQ3kekPLz2tHd4aZ6gT47VfFcLkT3D1w2gaP0jFiXvhQ5WaIqN+8OVl/e0zm6AwEEhZStiIMjf5Yw+Qznl1/996m313e7+h4Vlmr8GsYvk9sSDxUk8XiW6suJOQhz1Bk=" originalsrc="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/hook-commands" shash="vZn4YXomI8WdIDJcjl30siIr3/TadvHx4lHEhboYAn/pr09Lv978+CgaTzD9rAfDml/4nX+yQU+Dt40q5RoPQ6ZhQObST0+cWnnyGSCyuZsOtpMfjPZbWUTnV0N7xzcl3S4vmoYarYSusvj4fpM+ipFQ6GZsonM8itWTaJ5jSLk=">https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/hook-commands</a></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Is one of these actions suitable for you? What is the exact use case, when are you intending to run the script?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Attila</div>
<div id="x_x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> syslog-ng <syslog-ng-bounces@lists.balabit.hu> on behalf of William Luiz Ribeiro Vasconcelos Da Silva <wsilva_ericsson@timbrasil.com.br><br>
<b>Sent:</b> Tuesday, December 3, 2019 9:17 PM<br>
<b>To:</b> syslog-ng@lists.balabit.hu <syslog-ng@lists.balabit.hu><br>
<b>Subject:</b> [syslog-ng] How to syslog-ng execute shell script</font>
<div> </div>
</div>
<div dir="ltr">
<div style="background-color:#FFEB9C; width:100%; border-style:solid; border-color:#9C6500; border-width:1pt; padding:2pt; font-size:10pt; line-height:12pt; font-family:'Calibri'; color:Black; text-align:left">
<span style="color:#9C6500; font-weight:bold">CAUTION:</span> This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.</div>
<br>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello People,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
How to configure the syslog-ng.conf file, to call a shell script, for example to do zip file.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
It is possible to do this?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Tks,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
William Luiz</div>
<br>
<font size="-2">Esta mensagem, incluindo seus anexos, pode conter informações privilegiadas e/ou de caráter confidencial, não podendo ser retransmitida sem autorização do remetente. Se você não é o destinatário ou pessoa autorizada para recebê-la, informamos
 que o seu uso, divulgação, cópia ou arquivamento são proibidos. Portanto, se você recebeu esta mensagem por engano, por favor nos informe respondendo imediatamente a este e-mail e delete o seu conteúdo.
<p style="margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px">This message, including its attachments, may contain privileged or confidential information, and it must not be fowarded without the express authorization of the sender. If you
 are not the intended recipient, we hereby inform you that the use, disclosure, copy or filing are forbidden. So, if you received this message as a mistake, please inform us by answering this e-mail and deleting its contents
</p>
</font>
<p style="margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px"><font size="-2">Questo messaggio, inclusi gli allegati, potrebbe contenere informazioni privilegiate e/o riservate, e non deve essere ritrasmesse senza l'autorizzazione del mittente.
 Se non siete il destinatario o la persona autorizzata a riceverlo, informiamo che il suo utilizzo, diffusione, copia o archiviazione sono proibite. Quindi, se avete ricevuto questo messaggio per errore, per cortesia ci informi rispondendo immediatamente a
 questa email e cancelli il suo contenuto </font></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>