Re: [rsyslog] Sourcing Environment Variables for Use in Templates?

2017-10-27 Thread David Lang
DebugFormat, you will see all the variables that exist, and the bottom three lines with be $!, $., and $\ David Lang On Wed, 25 Oct 2017, deoren wrote: Date: Wed, 25 Oct 2017 17:24:22 -0500 From: deoren Reply-To: rsyslog-users To: rsyslog@lists.adiscon.com Subject: Re: [rsyslog] Sourcing Envi

Re: [rsyslog] Sourcing Environment Variables for Use in Templates?

2017-10-27 Thread deoren
On 10/27/2017 5:19 PM, Naftuli Kay via rsyslog wrote: Can anyone shed any light on how to set global variables? Environment variables won't change over the lifetime of the process so it would make sense to not have to allocate for every log message. Thanks, - Naftuli Kay I've not used them y

Re: [rsyslog] Sourcing Environment Variables for Use in Templates?

2017-10-27 Thread Naftuli Kay via rsyslog
t; If you write a log with the template RSYSLOG_DebugFormat, you will see all > the variables that exist, and the bottom three lines with be $!, $., and $\ > > David Lang > > On Wed, 25 Oct 2017, deoren wrote: > > Date: Wed, 25 Oct 2017 17:24:22 -0500 >> From: deoren >&

Re: [rsyslog] Sourcing Environment Variables for Use in Templates?

2017-10-25 Thread David Lang
nd the bottom three lines with be $!, $., and $\ David Lang On Wed, 25 Oct 2017, deoren wrote: Date: Wed, 25 Oct 2017 17:24:22 -0500 From: deoren Reply-To: rsyslog-users To: rsyslog@lists.adiscon.com Subject: Re: [rsyslog] Sourcing Environment Variables for Use in Templates? On 10/25/2017

Re: [rsyslog] Sourcing Environment Variables for Use in Templates?

2017-10-25 Thread deoren
On 10/25/2017 4:18 PM, Naftuli Kay via rsyslog wrote: So would I do "set $deploy_env = getenv('DEPLOY_ENV')"? How would I then reference this variable? I'm still trying to learn more about rsyslog variables and how to use them in templates. I'm still learning myself, so I completely understand.

Re: [rsyslog] Sourcing Environment Variables for Use in Templates?

2017-10-25 Thread Naftuli Kay via rsyslog
So would I do "set $deploy_env = getenv('DEPLOY_ENV')"? How would I then reference this variable? I'm still trying to learn more about rsyslog variables and how to use them in templates. Thanks, - Naftuli Kay On Wed, Oct 25, 2017 at 2:05 PM, deoren < rsyslog-users-lists.adiscon@whyaskwhy.org

Re: [rsyslog] Sourcing Environment Variables for Use in Templates?

2017-10-25 Thread deoren
On 10/25/2017 3:48 PM, Naftuli Kay via rsyslog wrote: I have a few environment variables that I'd like to include in my log messages that I'm formatting in JSON format. I have a service that runs on boot which generates /etc/sysconfig/ec2 which contains variables like EC2_INSTANCE_ID, EC2_AMI_ID,

[rsyslog] Sourcing Environment Variables for Use in Templates?

2017-10-25 Thread Naftuli Kay via rsyslog
I have a few environment variables that I'd like to include in my log messages that I'm formatting in JSON format. I have a service that runs on boot which generates /etc/sysconfig/ec2 which contains variables like EC2_INSTANCE_ID, EC2_AMI_ID, etc. If I expose these environment variables to the rs