Can i run logstash without conf file, all conf data in command line?

Hi All

Can i run logstash without conf file, all conf data in command line?
I am using multiple conf files, for which it is hard for me to maintain these small conf files in server.

I am looking a way wherein i can use command line flag to provide all the string of conf file itself

I checked the documentation, it says there is a command for it "-e, --config.string CONFIG_STRING"

instead of calling the conf files by providing location in command line, can i paste directly the input,filter and output of conf file in command?

logstash.bat --debug -e " here copy paste conf file data"

but this is not working for me. Please let me know if my assumption for --e command is correct?

Please be more explicit, not working how? Are you getting errors? What are they? What version are you on?

I am using logstash 5.2.2
I get error as

Unknown command '{'
which is starting point of conf file.

Do i have to provide the escape in each string?.

All i am interested is, if this is possible with command line, if yes please suggest example

Please show the command you are running.

If you have multiple logically separated configs, Logstash 6.x now supports configuration of multiple pipelines, which can simplify deployments and cut down on the amount of conditionals required to control flow.

Thanks for your replies.
Sorry my late response, actually i dont want to use any physical files, i want to run the pipeline just with service.

Is that possible?

I have never tried passing anything complex that way. I think that option was added as an easy way to get started, not necessarily to handle large and complex configurations.

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