-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Elasticsearch ILM policies #2048
Comments
@markosiira-arm could you please point us to ES docs regarding what features you want to use? Is it this one https://www.elastic.co/guide/en/elasticsearch/reference/master/index-lifecycle-management.html? Note that we cannot use x-pack or any other non OSS Elasticsearch extensions.
Templates are here https://github.com/jaegertracing/jaeger/tree/master/plugin/storage/es/mappings. You can modify them and install before Jaeger is deployed and then disable overriding by EDIT: the license is BASIC https://www.elastic.co/subscriptions |
Thank you for responding quickly to my issue. ILM docs are at: https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html and It seems that feature is marked as x-pack and AFAIK it's available with basic (no-cost) license level. I have also seen jaeger-dependencies indices, I suppose those are orignated from spark ? That template is not available in the https://github.com/jaegertracing/jaeger/tree/master/plugin/storage/es/mappings . Any suggestion how to manage those indices with policies ? |
@markosiira-arm good spotting about those dependency index templates being missing. |
I tried implementing ILM to manage jaeger indices - my implementation in comment below. |
@bhiravabhatla let's move the discusion about ILM here from the link ^^^. I got a notification about bhiravabhatla/jaeger-index-rollover-with-ilm@a53c4d7. I glanced on the PR and it seems that there are these changes:
Is it feasible to hardcode the ILM policy name in the templates? This way users could use the feature with a minimal changes in Jaeger. |
@pavolloffay - Yes we can. Actually it was hardcoded before, I got a feedback on my blog on this, and it made sense to make ILM policy name customizable for now -as user is responsible to create ILM policy manually now. When we actually build this capability in jaeger - it could be hardcoded like the read and write alias names. Thoughts? Or Are you suggesting to move the creation on ILM policy to the script? - Which would be tricky as the ILM policy could be different for different users. If you ask me, I would rather leave ILM creation to the user and have him/her pass the name - that way we can be flexible. We already have a check in init script to see if ILM policy passed is already created or not, so we are covered in case init is run before creating ILM. |
I am suggesting it to hardcode the name. That way we don't have to make changes in rollover scripts and add flag to jaeger. |
@pavolloffay - Makes sense, Agreed. But I guess we still need to have a check in place if the ILM with that name is already created or not. May be we can have this check in jaeger in future. One more change I did in the scripts was to add is_write_index true while adding write alias to initial/first index. This is still needed. |
Also can a template reference non existing ILM policy?
When is the policy created? If it is created once before the first deployment the check might not be needed users would be responsible for creating it. |
Yes, it can. But if the first index is created before creating the Policy (i.e. if init is run before Policy exists). Index would end up referencing an non-existent policy. User could go back create the ILM later - until ILM is created - no rollover happens obviously.
Ideally it should be created before jaeger is brought up. And yes we can document the same, and leave it to the user to make sure the ILM is created. @pavolloffay Thoughts? |
If the template can reference non-existing ILM policy then we should add it to our templates to simplify the configuration. If my understanding is correct users would just then create the policy before app startup and run the rollover (with the change (is_write_index). |
@bhiravabhatla would you be able to create a PR to add ILM policy name to jaeger templates? We could also set the |
This has to be done while we add the first indices span/service (*-000001) to write alias. Dint get your point of adding is_write_index in template @pavolloffay |
Makes sense. We should document the name of the ILM somewhere. And we decided it should be "jaeger"? @pavolloffay |
Sure, would raise, once we conclude on above questions, I guess would need to raise a PR for init script as well where we need to add is-write-index setting. |
|
@pavolloffay - Let me make those changes and raise a PR. One more thing is once we have the ILM - dont think we would be needing rollover & cleanup scripts. You want to add a deprecation warning there? We can also have the initializer as an optional pre-hook in jaeger helm charts - if it isnt already there. |
…aintain backwards compatibility & to override the templates created by jaeger
Signed-off-by: santosh <[email protected]>
…efixes Signed-off-by: santosh <[email protected]>
…id creating new templates in repo. Signed-off-by: santosh <[email protected]>
…g argument Signed-off-by: santosh <[email protected]>
…line param Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
… escaping quotes Signed-off-by: santosh <[email protected]>
…e names with index prefix Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
…test for es versions less than 7 Signed-off-by: santosh <[email protected]>
…S version < 7 Signed-off-by: santosh <[email protected]>
…emplates with text/template and golang util & Implement feedback on tests Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
…t tests Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
…tGetDependenciesMappings() Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
…dices Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
…dices Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
Signed-off-by: santosh <[email protected]>
* #2048 - Support Elasticsearch ILM for managing jaeger indices Signed-off-by: santosh <[email protected]> * #2048 - Implement @yurishkuro's feedback on PR Signed-off-by: santosh <[email protected]> * #2048 - Fix fmt issue Signed-off-by: santosh <[email protected]> * #2048 - Fix estemplate package alias Signed-off-by: santosh <[email protected]>
Requirement - what kind of business use case are you trying to solve?
I want to define index lifecycle policy to manage jaeger indicies in Elasticsearch. Purpose for me is to set policy that will delete outdated indices. There may be other use-cases as well.
Problem - what in Jaeger blocks you from solving the requirement?
Index templates used by jaeger are not easily modifiable. We would like to define the policy in the index template to work with daily indices.
Proposal - what do you suggest to solve the problem or improve the existing situation?
Allow defining the policy somehow to all indices used by jaeger.
Any open questions to address
The text was updated successfully, but these errors were encountered: