DevTech101

DevTech101

Dealing with SSDs in Elasticserach

Upload a template for SSD(HOT) disk, so new index’s are placed on SSD.

curl -XPUT http://elk1.domain.com:9200/_template/web-sql-log -d '              
{
  "template": "web-sql-log-*",
  "settings": {
    "index.refresh_interval": "5s",
    "index.routing.allocation.require.box_type": "hot",
    "number_of_shards" : 3
  }
}'

Verify new template

curl -XGET 'http://elk1.domain.com:9200/_template/web-sql-log?pretty'              
{
  "web-sql-log" : {
    "order" : 0,
    "template" : "web-sql-log-*",
    "settings" : {
      "index" : {
        "number_of_shards" : "3",
        "routing" : {
          "allocation" : {
            "require" : {
              "box_type" : "hot"
            }
          }
        },
        "refresh_interval" : "5s"
      }
    },
    "mappings" : { },
    "aliases" : { }
  }
}
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: