#2260
[How-To] ELK
Elasticsearch commands :
Create simple lifecycle policy with a retention of 30 days :
curl -XPUT http://${host}/_ilm/policy/delete-older-than-30-days -H 'Content-Type: application/json' -d ' {"policy":{"phases":{"hot":{"min_age":"0ms","actions":{"set_priority":{"priority":100}}},"delete":{"min_age":"30d","actions":{"delete":{}}}}}} '
Create a simple template with Lifecycle policy:
curl -XPUT http://${host}/_template/template_TEMPLATE_NAME -H 'Content-Type: application/json' -d ' {"order":0,"index_patterns":["index-pattern-1-*", "index-pattern-2-*", "index-pattern-3-*"],"settings":{"index":{"lifecycle":{"name":"delete-older-than-30-days"},"blocks":{"read_only_allow_delete":"false"}}},"mappings":{},"aliases":{}} '
Enable read/write on all indexes:
curl -XPUT http://${host}/_all/_settings?pretty -H 'Content-Type: application/json' -d ' {"index.blocks.read_only_allow_delete": false} '
Create lifecycle policy with a retention of 10 days and a rollowver of 5 days :
curl -XPUT http://${host}/_ilm/policy/rollover-5-days-delelte-10-days -H 'Content-Type: application/json' -d ' { "policy": { "phases": { "hot": { "min_age": "0ms", "actions": { "rollover": { "max_age": "5d", "max_size": "5gb" }, "set_priority": { "priority": 100 } } }, "warm": { "min_age": "5d", "actions": { "readonly": {}, "set_priority": { "priority": 50 } } }, "delete": { "min_age": "10d", "actions": { "delete": {} } } } } } '
[Powershell] How-To [How-To] Kubernetes
CURATOR :
Add Yum repo :
Install
List APM Indices :
Delete any span indices older than 1 day:
Error “this cluster currently has [1000]/[1000] maximum shards open”