I am using logstash to centralize all logs from beats then send them to Elastisearch. I create all ILM policies, index templates, bootstrap each index, and everything goes perfect until rollover, the second index packetbeat-7.12.0-000002 is created and set to is_write_index = true and the old index packetbeat-7.12.0-000001 is set to is_write_index = false automatically, but the data keeps writing on the old index packetbeat-7.12.0-000001.
No error logs - nothing! It is happening for all beats and other plugins like Elastiflow that has its own Netflow collector and does not pass through Logstash.
GET _ilm/policy/packetbeat_policy
{
"packetbeat_policy" : {
"version" : 7,
"modified_date" : "2021-04-27T16:22:04.629Z",
"policy" : {
"phases" : {
"hot" : {
"min_age" : "0ms",
"actions" : {
"rollover" : {
"max_size" : "30mb", (just to force rollover)
"max_age" : "2d"
}
}
GET _template/packetbeat_template
{
"packetbeat_template" : {
"order" : 1,
"index_patterns" : [
"packetbeat-*"
],
"settings" : {
"index" : {
"lifecycle" : {
"name" : "packetbeat_policy",
"rollover_alias" : "packetbeat"
},
"mapping" : {
"total_fields" : {
"limit" : "10000"
}
},
GET packetbeat-7.12.0-000001
{
"packetbeat-7.12.0-000001" : {
"aliases" : {
"packetbeat" : {
"is_write_index" : false
}
},
"mappings" : {
"_meta" : {
"beat" : "packetbeat",
"version" : "7.12.0"
},
GET packetbeat-7.12.0-000002
{
"packetbeat-7.12.0-000002" : {
"aliases" : {
"packetbeat" : {
"is_write_index" : true
}
},
"mappings" : {
"_meta" : {
"beat" : "packetbeat",
"version" : "7.12.0"
},
Packetbeat 7.12
Winlogbet 7.11