[syslog-ng] How to syslog-ng execute shell script

William Luiz Ribeiro Vasconcelos Da Silva wsilva_ericsson at timbrasil.com.br
Wed Dec 4 12:06:27 UTC 2019


Attila,

My goal is after the file generation by syslog-ng. Call a script to concatenate files in 1000 lines and after running gzip.
Because the system that will collect these files expects the files to always be "zipped" and suffixed with .gzip

Regards,
William
________________________________
De: syslog-ng <syslog-ng-bounces at lists.balabit.hu> em nome de Attila Szakacs (aszakacs) <Attila.Szakacs at oneidentity.com>
Enviado: quarta-feira, 4 de dezembro de 2019 06:24
Para: syslog-ng at lists.balabit.hu <syslog-ng at lists.balabit.hu>
Assunto: Re: [syslog-ng] How to syslog-ng execute shell script

Hi William,

Yes it is possible:
program source: https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/23#TOPIC-1297952<https://nam01.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%7Cwsilva_ericsson%40timbrasil.com.br%7C9fa8d544d77a461df8c308d7789bc668%7C57b8c96eac2f4d78a149f1fc6817d3c4%7C0%7C0%7C637110482782475600&sdata=yJgNouFssAPiUiyYKTapx63UNE8GiHTM%2F0YcKTpdsKU%3D&reserved=0>
program destination: https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/43#TOPIC-1298032<https://nam01.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%7Cwsilva_ericsson%40timbrasil.com.br%7C9fa8d544d77a461df8c308d7789bc668%7C57b8c96eac2f4d78a149f1fc6817d3c4%7C0%7C0%7C637110482782475600&sdata=68K%2Faw7AK2dwSwzpw91ip3YaLaBNMCeje3IZPi7giw0%3D&reserved=0>
hook-commands (for all sources and drivers with a few exceptions): https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.24/administration-guide/hook-commands<https://nam01.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%7Cwsilva_ericsson%40timbrasil.com.br%7C9fa8d544d77a461df8c308d7789bc668%7C57b8c96eac2f4d78a149f1fc6817d3c4%7C0%7C0%7C637110482782485592&sdata=fzi7OJBCdFwhcrQMueUMRwXUpTEpV9ZfZc2pdAt3H1s%3D&reserved=0>

Is one of these actions suitable for you? What is the exact use case, when are you intending to run the script?

Regards,
Attila
________________________________
From: syslog-ng <syslog-ng-bounces at lists.balabit.hu> on behalf of William Luiz Ribeiro Vasconcelos Da Silva <wsilva_ericsson at timbrasil.com.br>
Sent: Tuesday, December 3, 2019 9:17 PM
To: syslog-ng at lists.balabit.hu <syslog-ng at lists.balabit.hu>
Subject: [syslog-ng] How to syslog-ng execute shell script

CAUTION: 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.

Hello People,

How to configure the syslog-ng.conf file, to call a shell script, for example to do zip file.

It is possible to do this?

Tks,
William Luiz

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.

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

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20191204/6a3d7dc7/attachment.html>


More information about the syslog-ng mailing list