Hi All
I have a conf file, below is the example
When i run this in linux machine with a .conf file file, it work perfectly with command line -f
`
.logstash --debug -f test.conf
`
below is the conf file
> input {
> elasticsearch {
> hosts => ["localhost.com:9200"]
> ssl => true
> ssl_certificate_verification => false
> user => "abcd"
> password => "xyz"
> index => "testing"
> size => 10
> }
> }
>
> filter {
>
>
> }
>
> output {
> stdout { codec => rubydebug }
>
> s3{
> access_key_id => "sddsdsdsdsd"
> secret_access_key => "sdsdsdsdsddsdsdsdsdds"
> region => "ap-south-1"
> bucket => "trial"
> size_file => 1234
> time_file => 15
>
> }
> }
but when i run the same content with command line flag like this -e, it does not work
i am just converting the whole content of my conf file from to a single command like below, i get different error.
Do i need to escape each and every line?
Do we have a better solution to just use the conf file directly with command line flag -e
So i dont have to escape each /n, "", '' etc. How to fix this issue , any idea?
logstash --log.level debug -e "input { elasticsearch { hosts => ["localhost.com:9200"] ssl => true ssl_certificate_verification => false user => "abcd" password => "xyz" index => "testing" size => 10 } } filter { } output { stdout { codec => rubydebug } s3{ access_key_id => "sddsdsdsdsd" secret_access_key => "sdsdsdsdsddsdsdsdsdds" region => "ap-south-1" bucket => "trial" size_file => 1234 time_file => 15 } }"
Thanks