This section provides information about the hosted Elasticsearch Curator offering for the ObjectRocket Dedicated platform.
What is Curator?¶
Curator is a tool that lets you schedule regular actions against the indices in your cluster, based on predefined filters. ObjectRocket has integrated Curator into the service so you can use the UI to configure it and let ObjectRocket handle the day-to-day Curator maintenance and execution.
Curator’s main functions consist of actions to perform and filters to decide which indices to act against.
ObjectRocket supports the following Curator actions:
- Delete: Delete the indices that match the specified filters.
- Close: Close the indices that match the specified filters.
- Alias: Add or remove indices from an alias that match the specified filters.
- Create: Create a new index. This action must follow a Delete or Close action.
Curator task options¶
To create a task in Curator, use the following steps:
Select your Elasticsearch instance from the ObjectRocket UI.
Select Add Task under the Curator section.
The following fields display:
Task Name: The name of the task. This field is required and includes a description of what this task does.
Task Type: Delete or Close. You can choose to Delete the indices that match the filters or Close them to writes and queries. This field is required.
Filters: The filters allow you to narrow which indices Curator affects.
- Add/Remove: When you select the Alias Task Type, you can specify separate filters for the indices you want to add to the alias and the indices you want to remove from the alias.
- Filter by age: Allows you to set a filter based on the age of the index. The age is based on the creation date of the index.
- Filter by name: Allows you to set a filter based on the naming convention or RegEx.
Schedule: Determines how often to run Curator. The default is every 5 minutes, but you can schedule tasks to run at specific times.
Create a new index: If a Close or Delete event occurs, you have the option to create a new index based on the name pattern provided.
You must select at least one of the filters. If you select both filters, Curator tkes action only against indices that match both filters.
How often do the tasks run?¶
By default, each task is run at least once every 5 minutes. If there are no indices returned by the filters, no action is performed.
An option to set a schedule to run Curator tasks at a specific time is available. It includes the following settings:
- Every hour at the specified minute.
- Every day at the specified time.
- Every week at the specified day and time.
- Every month on the specified day and time. If you select day 31, that task runs on the last day of the month in shorter months.
The following tutorial explains how to use the alias action in Curator to maintain an alias for the indices covering only the last 7 days.
Begin at the Instance Details page for the cluster to which you want to add an Alias Curator task.
Select the Curator tab.
In the image above, some Curator tasks are already created.
Select Add Task to create an Alias Curator task.
Select the alias task type.
Name your task. The example task is called “lastSevenDays alias”.
Specify the alias name (“lastSevenDays” for this example).
Adjust the filters to specify the indices that you want to add or remove from the alias.
The selected filters add all indices that are newer than 7 days and remove those that are older than 7 days.
Keep the default interval (every 5 minutes) to specify that this task runs regularly to keep the alias up-to-date.
Select Save Task. The task now runs every 5 minutes to keep the Elasticsearch Alias updated.