How to make custom Logstash start parameters / arguments


#1

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?


(Magnus Bäck) #2

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


#3

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


(Magnus Bäck) #4

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


#5

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?


(Magnus Bäck) #6

You're probably looking for runner.rb.


(system) #7

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