How to pass command line arguments to logsatsh

Can we pass command line arguments to logstash.?

I am sending the output from logstash to redis server. I would like to use command line arguments to pass the redis host.

How can we pass command line arguments to logstash and use them in script.?

No, but in recent versions of Logstash you can reference environment variables in the configuration files.