Hi everyone, I'm new to Elastic stack. I'm using Elasticsearch, Kibana, Logstash, and filebeat to parse server logs.
I follow this link
After I run this command
curl -XGET 'localhost:9200/logstash-2020.04.28/_search?pretty&q=response=200'
I got
{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index [logstash-2020.04.28]",
"resource.type" : "index_or_alias",
"resource.id" : "logstash-2020.04.28",
"index_uuid" : "_na_",
"index" : "logstash-2020.04.28"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index [logstash-2020.04.28]",
"resource.type" : "index_or_alias",
"resource.id" : "logstash-2020.04.28",
"index_uuid" : "_na_",
"index" : "logstash-2020.04.28"
},
"status" : 404
}
And this command returns
curl 'localhost:9200/_cat/indices?v'
yellow open logstash-2020.04.25-000001 nPrSmQw_R3qs7Hv42D9C-w 1 1 2 0 8.5kb 8.5kb
yellow open bank 4ALE29wkT1ux-67KHyJwZA 1 1 1000 0 414.1kb 414.1kb
green open .kibana_task_manager_1 pgRzLa4rTNOF7TSs2ZU-NQ 1 0 2 0 31.5kb 31.5kb
green open .apm-agent-configuration lGNS43ojTUShppVn8jKXFQ 1 0 0 0 283b 283b
green open ilm-history-1-000001 OlXaDI59Q1-v9BJLJfjSLQ 1 0 8 0 34kb 34kb
yellow open shakespeare 9d6hEfj2TMO23mUdvcRekw 1 1 111396 0 20.7mb 20.7mb
yellow open logstash-2015.05.20 CZy1OYQVQPiX5dZy_UALZQ 1 1 4750 0 18.6mb 18.6mb
green open .kibana_1 L7hr7boDS6aoPCsmroVAxw 1 0 17 5 58.6kb 58.6kb
yellow open logstash-2015.05.18 LN2-gJZ4RUOAMDQSKvv8qQ 1 1 4631 0 18mb 18mb
yellow open logstash-2015.05.19 VgRV4M7JTEmvkHZW6YQ80g 1 1 4624 0 17.3mb 17.3mb
but my new index not shows here
first-pipline.conf
input {
beats {
port => "5044"
}
}
# The filter part of this file is commented out to indicate that it is
# optional.
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}"}
}
}
output {
elasticsearch {
hosts => [ "localhost:9200" ]
}
}
filebeat.yml
filebeat.inputs:
- type: log
paths:
- /Applications/logstash-tutorial.log
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
setup.kibana:
output.logstash:
# The Logstash hosts
hosts: ["localhost:5044"]
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
Thank you.