Mailing List Archive

Setting/using an environment variable in JSON template properly?
Am I setting the variable and using it properly in this template?
set $.broker = getenv('KAFKA_HOST');module(load="omkafka")*.*
action(type="omkafka" topic="textlogs" broker=["$.broker"]
#variable used here queue.type="LinkedList" queue.size="100000"
queue.filename="DAQueueKafkaTextLogs" queue.maxFileSize="1g"
queue.saveOnShutdown="on" queue.fullDelaymark="98000"
queue.discardMark="95000" queue.discardSeverity="5")




--
Sent from: http://rsyslog-users.1305293.n2.nabble.com/
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: Setting/using an environment variable in JSON template properly? [ In reply to ]
it's rather hard to see what you have hear, but you can't always use variables
inside actions, you can only use them where they are explicitly allowed.

David Lang

On Fri, 16 Aug 2019, logdev4123 via rsyslog wrote:

> Am I setting the variable and using it properly in this template?
> set $.broker = getenv('KAFKA_HOST');module(load="omkafka")*.*
> action(type="omkafka" topic="textlogs" broker=["$.broker"]
> #variable used here queue.type="LinkedList" queue.size="100000"
> queue.filename="DAQueueKafkaTextLogs" queue.maxFileSize="1g"
> queue.saveOnShutdown="on" queue.fullDelaymark="98000"
> queue.discardMark="95000" queue.discardSeverity="5")
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.