How to make custom Logstash start parameters / arguments

Hi,

Logstash takes a lot of file parameters while starting like;

--path.settings=/logstash-5.0.0/config/

I want to pass something like, for example, I have a jdbc input in logstash and how can I pass it through command line argument when I start logstash like;

--dbname=my_log_db

Is this possible?

I don't think so, but you can reference environment variables: https://www.elastic.co/guide/en/logstash/current/environment-variables.html

Ok.. So, could you tell me how logstash is identifying these parameters, or in which ruby file these are defined?

I don't understand your question. Are you asking where you should set the values of the environment variables?

Hi, I meant, not environment variables, but the command line flags. Hows logstash recognizing it, or which ruby file is responsible for parsing the command line flags?

You're probably looking for runner.rb.

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