Environment variables in syslog

Faisal Chishti <[email protected]> Tue, 28 Jun 2022 16:11:06 +0530
Newsgroups gmane.comp.syslog-ng
Message-ID <CACqw0S+JEwgbnMkHRgvDz1WNU=cptgAxop=7cvphL9EBy7JttA@mail.gmail.com>
Hellow,

Please see below the snippet from my syslog-ng.conf file. ABC_LOG_PATH is
the environment variable on the host that contains the path. I am trying to
access the env variable within the config. It does not throw any error and
the configuration is valid but it does not work properly. I don't see the
file agent.log being used at all.

source s_agent {

    file("`ABC_LOG_PATH`/agent.log" follow-freq(1)

            flags(no-parse));

};



root@syslog-ng-784fdc497-pgdzr:/# syslog-ng --version

syslog-ng 3 (3.30.1)

Config version: 3.29

Installer-Version: 3.30.1

Revision:

Compile-Date: Apr 12 2022 20:15:37

Module-Directory: /usr/lib/syslog-ng

Module-Path: /usr/lib/syslog-ng

Include-Path: /usr/share/syslog-ng/include

Available-Modules:
add-contextual-data,afamqp,affile,afprog,afsocket,afsql,afstomp,afuser,appmodel,azure-auth-header,basicfuncs,cef,confgen,cryptofuncs,csvparser,dbparser,disk-buffer,graphite,hook-commands,http,json-plugin,kvformat,linux-kmsg-format,map-value-pairs,mod-python,pseudofile,redis,secure-logging,stardate,syslogformat,system-source,tags-parser,timestamp,xml

Enable-Debug: off

Enable-GProf: off

Enable-Memtrace: off

Enable-IPv6: on

Enable-Spoof-Source: off

Enable-TCP-Wrapper: off

Enable-Linux-Caps: off

Enable-Systemd: off


root@syslog-ng-784fdc497-pgdzr:/# uname -a

Linux syslog-ng-784fdc497-pgdzr 4.18.0-147.3.1.el8_1.x86_64 #1 SMP Fri Jan
3 23:55:26 UTC 2020 x86_64 GNU/Linux

root@syslog-ng-784fdc497-pgdzr:/#

-- 
Regards,
Faisal

______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq