Reputation: 1333
I am new to ELK Stack and trying to view logs on kibana which is hosted on different server. Following are my configurations for Filebeat and logstash in my localhost pc and logstash is succesfully recieving logs from filbeat.
I am facing a lot of confusion in creating an index pattern in kibana. how do i know the index variable parameters [@metadata][beat] and [@metadata][version] present in output node in logstash.conf so that i will create an index pattern and access the same in kibana discover page
filebeat.yml
filebeat.inputs:
- type: log
enabled: true
paths:
- /home/mahesh/Documents/refactor/nomi/unity/media/*.log
output.logstash:
enabled: true
hosts: ["localhost:5044"]
logstash.conf
input {
beats {
port => 5044
ssl => false
}
}
filter {
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:timestamp}] %{LOGLEVEL:loglevel}\|%{GREEDYDATA:module}\|%{GREEDYDATA:content}" }
}
date {
locale => "en"
match => [ "timestamp", "YYYY-MM-dd HH:mm:ss"]
target => "@timestamp"
timezone => "America/New_York"
}
}
output {
elasticsearch {
hosts => "elk_server_ip:9200"
manage_template => false
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
}
stdout { codec => rubydebug { metadata => true } }
}
Upvotes: 1
Views: 965
Reputation: 1514
You can list your indexes by using:
elk_server_ip:9200/_cat/indices
More details here
Upvotes: 2