'How to send logs into elastic - logstash
I need to send logs into elastic and then watch them with kibana I've done this
1.this is my yml file
spring:
application:
name: ELK-STACK-EXAMPLE
server:
port: 9898
logging:
file: /pedro/IdeaProjects/elk-stack-logging-example/src/main/resources/elk-stack.log
this is .conf file
input {
file {
path => "/pedro/IdeaProjects/elk-stack-logging-example/src/main/resources/elk-stack.logIdeaProjects/elk-stack-logging-example/src/main/resources/elk-stack.log"
start_position =>"beginning"
}
}
output {
stdout{
codec => rubydebug
}
elasticsearch {
hosts => ["***********************************************************"]
}
}
in hosts it's written the host:port
in "kibana" I want to create index pattern with logstash-* ,but it says not match with indexes
do I need to create index ?
I even added'
hosts => ['host']
user => 'elastic'
password => '******'
index => don't know what to type
Solution 1:[1]
There are many ways to write into the index.
For example: index => "logstash-%{+yyyy.MM.dd}"
In this case the Logstash will write into day rollower index "logstash-TODAY_DATE
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vakhtang |
