Http_poller: how to use an environment variable for the url?

I'm trying to use an env variable to define the url when using the http_poller input plugin.
But I have an error about the url encoding which is not good.

How to encode it?

http_poller {
	urls => {
		test => {
			url => "${LS_TEST_URL}"
			method => get
			headers => {Accept => "application/json"}

Hi @Michel99_7 .

  1. I assume that you correctly set the environment variable? (e.g. export LS_TEST_URL="myurl")?

  2. Could you run Logstash with debug logging and send the debug logs to us?

For example: bin/logtash --debug -f <PATH_TO_CONFIG_FILE>

Thank you.

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