[syslog-ng] Add prefix Or suffix inside of FileName

William Luiz Ribeiro Vasconcelos Da Silva wsilva_ericsson at timbrasil.com.br
Tue Dec 17 14:08:06 UTC 2019


Hi Attila,

We need to put a suffix at the end of the file, as we have an external system that during syslog-ng processing will collect these files. And we find that syslog-ng is not putting a ".tmp" at the end of the file. Which in our case would be very important not to have problems.

Our concern is that syslog-ng is generating the file and another external application collects the file while processing syslog-ng, causing a problem for both applications.

I would like syslog-ng during file generation to put a ".tmp" at the end of the file name and when the file generation is finished replace ".tmp" with ".log".

Regards,
William Luiz
________________________________
De: syslog-ng <syslog-ng-bounces at lists.balabit.hu> em nome de Attila Szakacs (aszakacs) <Attila.Szakacs at oneidentity.com>
Enviado: terça-feira, 17 de dezembro de 2019 03:59
Para: syslog-ng at lists.balabit.hu <syslog-ng at lists.balabit.hu>
Assunto: Re: [syslog-ng] Add prefix Or suffix inside of FileName

Hi William,

Where do you want to insert the suffix? Filename, log line, name-value pair, etc..?
What kind of suffix is needed? Some static string, or a dynamically changing string?

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: Monday, December 16, 2019 9:53 PM
To: syslog-ng at lists.balabit.hu <syslog-ng at lists.balabit.hu>
Subject: [syslog-ng] Add prefix Or suffix inside of FileName

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 everyone,

It is possible during syslog-ng processing to insert a suffix, as we have a system that will collect these files.

And if we keep the same suffix, we have a big problem inside of prodction enviroment.

Here's an example of how the file generation part:

destination d_model {
    file("/syslog_out/udp_files/${HOST}_${YEAR}${MONTH}${DAY}${HOUR}${MIN}_GMT${TZ}.log"
         template("${PROGRAM};${MESSAGE};\n")
         owner(syslog)
         group(syslog)
         perm (0755)
    );
};



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/20191217/3035d30e/attachment.html>


More information about the syslog-ng mailing list