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

2017-10-27 Thread David Lang
l 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 <rsyslog-users-lists.adiscon@whyaskwhy.org> Reply-To: rsyslog-users <rsyslog@lists.adiscon.com> To: rs

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

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

2017-10-27 Thread Naftuli Kay via rsyslog
he 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 <rsyslog-users-lists.adisc

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

2017-10-25 Thread David Lang
!, $., and $\ David Lang On Wed, 25 Oct 2017, deoren wrote: Date: Wed, 25 Oct 2017 17:24:22 -0500 From: deoren <rsyslog-users-lists.adiscon....@whyaskwhy.org> Reply-To: rsyslog-users <rsyslog@lists.adiscon.com> To: rsyslog@lists.adiscon.com Subject: Re: [rsyslog] Sourcing Environment Varia

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

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 <

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,