Does the input and output plugins support variables?


#1

I'm trying to set up a pipeline configuration with the following input filter:

rabbitmq {
	exchange => "exchange"
	host => "%{HOST}"
	queue => "queue"
	durable => true
	ack => true
	threads => 1
	prefetch_count => 1000
	password => "%{PWD}"
	user => "%{USER}"
}

The variables, %{HOST}, %{PWD} and %{USER} should be read from environmental variables, but Logstash complains in the logs that it can not connect to %{HOST}, because it takes it as a literal string.

I'm using 5.2.

What could cause this?


(Magnus B├Ąck) #2

To read environment variables use ${FOO}, not %{FOO}.


#3

Thank you! That was it.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.