The logstash
config sets log files as input source and then sends the content to ElasticSearch
.
The input
part is like below
input{
file{
path => "/data/logs/backend.log*"
start_position => "beginning"
}
}
Then the log file will be rolling by size, which means at first the log file name is backend.log
, when the file reaches size 10M, then it is renamed to backend.log.1
, and a new empty backend.log is created to log content.
So the question is whether logstash
will send the content from backend.log.1
to es server? Or is ElasticSearch
able to distinguish that the content from backend.log.1
already received, although this seems to be not efficient.