HI ,
i am using filebeat 6.3 with the below configuration , however multiple inputs in the file beat configuration with one logstash output is not working.
Filebeat configuration :
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
paths:
- /opt/eureqa/TEST_filebeat/TE.log
tags: ["TE"]
fields: {log_type: te}
- type: log
paths:
- /opt/eureqa/TEST_filebeat/TMRS.log
tags: ["TMRS"]
fields: {log_type: tmrs}
# Change to true to enable this input configuration.
enabled: true
reload.enabled: true
reload.period: 10s
#============================== Kibana =====================================
# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
setup.kibana:
# Kibana Host
# Scheme and port can be left out and will be set to the default (http and 5601)
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
host: "192.168.0.159:5601"
#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
hosts: ["192.168.0.159:5998"]
# hosts: ["192.168.0.159:5998"]
Logstash Configuration:
input {
beats {
port => 5998
}
}
filter {
if [tag] == "TE" {
grok {
match => { message => "%{TIMESTAMP_ISO8601:timestamp} \[%{DATA:thread}] %{LOGLEVEL:log-level}%{DATA:class}- %{GREEDYDATA:message}"}
}
kv {
source => "message"
remove_field => "kv"
field_split => " "
value_split => ":"
include_brackets => "false"
remove_char_key => "{,"
recursive => "true"
}
}
else if [tag] == "TMRS" {
grok {
match => { message => "%{TIMESTAMP_ISO8601:timestamp} \[%{DATA:thread}] %{LOGLEVEL:log-level}%{DATA:class}- %{GREEDYDATA:message}"}
}
kv {
source => "message"
remove_field => "kv"
field_split => " "
value_split => ":"
include_brackets => "false"
remove_char_key => "{,"
recursive => "true"
}
}
}
output {
elasticsearch {
hosts => ["192.168.0.159:9200"]
manage_template => false
index => "%{tag}-index"
}
}
I am not able to create index with the above configuration and suggest me the above configuration has any mistakes.
BR,
Ramesh