I am a absolutely newbie in the Elasticsearch.
I am getting a stuck in creating 2 pipelines towards 2 indexes of 2 log file (2 services in corresponding).
My topo likes that: Filebeat ==> logstash ==> Elasticsearch==> Kibana.
In the filebeat.yml, i have a configuation to 2 files: (of course, I have comment output to Elasticsearch and uncomment to Logstash)
filter {
if ([fields][log_type] == "syslog") {
grok {
match => { "message" => ['%{WORD:month} %{NUMBER:date} %{NOTSPACE:hour} %{NOTSPACE:hostname} %{GREEDYDATA:rest}'] }
}
}
else if {
grok {
match => { "message" => ['%{COMBINEDAPACHELOG:message}'] }
}
}
}
Output
output {
if ([fields][log_type] == "sys") {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "test"
}
}
else if ([fields][log_type] == "apa") {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "apach"
}
}
}
Kindly help to figure out any my mistake and eventually, please help to share if you have any idea to approach my goal.
P/S: With single pipeline, i can do well.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.