I am new to the ELK stack. Wanted to push data using a pipeline from filebeat to logstash, that'll push data to elastic. My configuration is as below:
input {
beats {
port => "5043"
}
}
filter {
grok {
match => { "message" => "\A%{TIMESTAMP_ISO8601:timestamp}%{SPACE}%{WORD:var0}%{SPACE}%{NOTSPACE}%{SPACE}(?<searchinfo>[^#]*)#(?<username>[^#]*)#(?<searchQuery>[^#]*)#(?<latitude>[^#]*)#(?<longitude>[^#]*)#(?<client_ip>[^#]*)#(?<responseTime>[^#]*)" }
}
}
output {
stdout { codec => rubydebug }
elasticsearch {
index => "logstash_logs"
document_type => "logs"
hosts => [ "localhost:9200" ]
}
The issue is when I do a bin/logstash -f first-pipeline.conf --config.test_and_exit
. It throws me an error stating:
17:55:37.691 [LogStash::Runner] FATAL logstash.runner - The given configuration is invalid. Reason: Expected one of #, if, ", ', } at line 22, column 1 (byte 487) after output {
stdout { codec => rubydebug }
elasticsearch {
index => "logstash_logs"
document_type => "logs"
hosts => [ "localhost:9200" ]
}
Can Anyone point out where am I going wrong?
You're missing a closing curly brace in your
elasticsearch
output