I have 8 node cluster 3 master 3 hot node and 2 warm node.I have an index called log-wlb-system
in hot node it will rotate every index after 1 day or when its size reach to 1gb and in warm node the retention is 2 days and delete it after 2 days
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "50gb",
"max_age": "1d"
},
"set_priority": {
"priority": 100
}
}
},
"warm": {
"min_age": "2d",
"actions": {
"set_priority": {
"priority": 50
}
}
},
"delete": {
"min_age": "2d",
"actions": {
"delete": {
"delete_searchable_snapshot": true
}
}
}
}
}
}
log-wlb-system details
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open log-wlb-system-2021.05.19-000001 gG2SxdF-R9a6eakoTGTGpA 1 1 479 2 1.4mb 750.8kb
green open log-wlb-system-2021.05.20-000002 vrxZsqhdRfC9GIE0x3utww 1 1 449 0 1.2mb 649.8kb
green open log-wlb-system-2021.05.21-000003 9pwBNOcCTG-o9e-8gJgioA 1 1 4 0 187kb 93.5kb
shards information
index shard prirep state docs store ip node
log-wlb-system-2021.05.19-000001 0 p STARTED 479 750.8kb xx.xx.xx.xx eh1
log-wlb-system-2021.05.19-000001 0 r STARTED 479 750.8kb xx.xx.xx.xx eh2
log-wlb-system-2021.05.20-000002 0 r STARTED 449 649.8kb xx.xx.xx.xx eh1
log-wlb-system-2021.05.20-000002 0 p STARTED 449 649.8kb xx.xx.xx.xx eh2
log-wlb-system-2021.05.21-000003 0 p STARTED 4 93.5kb xx.xx.xx.xx eh3
log-wlb-system-2021.05.21-000003 0 r STARTED 4 93.5kb xx.xx.xx.xx eh2
elasticsearch.yml file for warm node
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: hot-warm
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: ew1
node.roles: ["data_warm"]
#
# Add custom attributes to the node:
#
#node.attr.rack_id: rack_4
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: ew1
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["em1", "em2","em3","eh1","eh2","eh3","eh4","ew2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["em1", "em2","em3"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
xpack.security.enabled: true
#xpack.security.audit.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: full
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.key: certs/ew1/ew1.key
xpack.security.transport.ssl.certificate: certs/ew1/ew1.crt
xpack.security.transport.ssl.certificate_authorities: certs/ca/ca.crt
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.key: certs/ew1/ew1.key
xpack.security.http.ssl.certificate: certs/ew1/ew1.crt
xpack.security.http.ssl.certificate_authorities: certs/ca/ca.crt
xpack.monitoring.exporters.my_local:
type: local
use_ingest: false
the index is not rollovering