Can Skywalking create ES indexes with lifecycle policies or index templates?

285 views Asked by At

I am having trouble finding any information about this in documentation. In the config/application.yml file under storage.elasticsearch7 I see various configuration options. Is there a way to ensure that the indexes that get created are created using a given index template or ILM policy? I am running the helm chart for the ELK stack and ES version 8.0.0-SNAPSHOT.

My goal is to just delete indexes from SW after 2 weeks so that my cluster doesn't run out of shards.

1

There are 1 answers

0
swagrov On BEST ANSWER

I created a lifecycle that performs the delete action after a set time, and then I added this configuration to the skywalking application.yml under storage.elasticsearch7:

advanced: ${SW_STORAGE_ES_ADVANCED:"{\"index.lifecycle.name\":\"sw-policy\"}"}

SW creates index templates, and now I see that this is part of the template, and indeed the indexes have this sw-policy attached.