0
0
Elasticsearchquery~10 mins

Index lifecycle management in Elasticsearch - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a policy that deletes an index after 30 days.

Elasticsearch
{
  "policy": {
    "phases": {
      "delete": {
        "min_age": "[1]",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A30d
B30m
C30s
D30w
Attempts:
3 left
💡 Hint
Common Mistakes
Using minutes or seconds instead of days.
Forgetting to specify the time unit.
2fill in blank
medium

Complete the code to add a rollover action when the index reaches 50GB.

Elasticsearch
{
  "policy": {
    "phases": {
      "hot": {
        "actions": {
          "rollover": {
            "max_size": "[1]"
          }
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A50mb
B50tb
C50kb
D50gb
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase 'mb' instead of 'gb'.
Confusing size units like kb or tb.
3fill in blank
hard

Fix the error in the policy that tries to move an index to warm phase after 10 days.

Elasticsearch
{
  "policy": {
    "phases": {
      "warm": {
        "min_age": "[1]",
        "actions": {
          "allocate": {
            "number_of_replicas": 2
          }
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A10d
B10h
C10m
D10s
Attempts:
3 left
💡 Hint
Common Mistakes
Using hours, minutes, or seconds instead of days.
Omitting the time unit.
4fill in blank
hard

Fill both blanks to create a policy that moves an index to cold phase after 20 days and freezes it.

Elasticsearch
{
  "policy": {
    "phases": {
      "cold": {
        "min_age": "[1]",
        "actions": {
          "[2]": {}
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A20d
Bfreeze
Cdelete
Drollover
Attempts:
3 left
💡 Hint
Common Mistakes
Using delete or rollover actions in cold phase incorrectly.
Wrong time unit for min_age.
5fill in blank
hard

Fill all three blanks to define a policy with hot phase rollover at 25GB, warm phase after 7 days with 1 replica, and delete phase after 90 days.

Elasticsearch
{
  "policy": {
    "phases": {
      "hot": {
        "actions": {
          "rollover": {
            "max_size": "[1]"
          }
        }
      },
      "warm": {
        "min_age": "[2]",
        "actions": {
          "allocate": {
            "number_of_replicas": [3]
          }
        }
      },
      "delete": {
        "min_age": "90d",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A25gb
B7d
C1
D90d
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up time units or numbers.
Using wrong values for replicas.