[syslog-ng] is it possible to use if() ... else statements on syslog-ng 3.7?

Jorge Pereira jpereiran at gmail.com
Mon May 8 23:03:06 UTC 2017


Ops! The documentation explaining only to use with templates.

Basically, I am looking for how to do the below pseudo-code.

    destination {
        if ($R_MIN >= 0 && $R_MIN < 30)
            file("/path/file_00m-15m.log");
        else
            file("/path/file_30m-60m.log");
        endif()
    };

p.s: I need to save the logs in chunks of 30 minutes being 00m-30m & 31m-60m

--
Jorge Pereira

On Mon, May 8, 2017 at 7:52 PM, Jorge Pereira <jpereiran at gmail.com> wrote:

> never mind, I found it.
>
> https://www.balabit.com/documents/syslog-ng-ose-
> latest-guides/en/syslog-ng-ose-guide-admin/html/
> reference-template-functions.html
>
> --
> Jorge Pereira
>
> On Mon, May 8, 2017 at 7:46 PM, Jorge Pereira <jpereiran at gmail.com> wrote:
>
>> hi team,
>> is it possible to use if() ... else statements on syslog-ng 3.7? I am
>> trying to do something like.
>>
>> if ($value >= X)
>>   ......
>> else
>>   ......
>> --
>> Jorge Pereira
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20170508/1d1b7398/attachment.html>


More information about the syslog-ng mailing list