Hi Everyone!
I’m new using Graylog, as well as use Elastichsearch in cluster and MongoDB, it’s been a long learning curve to me but I’m enjoying everything.
My environment is:
Graylog 4, 2 nodes running in cluster
Elasticsearch 7, 6 nodes (2 hot, 2 warm, 2 cold)
MongoDB (4.4.4) running in Graylogs master node
elasticsearch-curator (5.8.3) running in the Elastichsearch master nodes
I was trying to configure Elasticsearch ILM in my end, but I saw here (improved elasticsearch index management (ILM) · Issue #9828 · Graylog2/graylog2-server · GitHub) that it can’t be done.
So I followed the recomendantion to use “Elasticsearch Curator” to do the dirty job and set configuration in Graylog Web Interface to rotate index based on time, rotating everyday.
This is working as expected, except for one step.
To make curator migrate data between hot, warm and cold nodes I had to add some custom setting in my index, as follow:
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_content",
"data": "hot",
"box_type": "warm,cold"
},
"require": {
"box_type": "warm,cold"
}
}
}
"index.routing.allocation.include.data": "hot" # To force new indexes to be created in Hot Nodes
"index.routing.allocation.include.box_type": "warm,cold" # To be used by curator to know where to alocate data.
"index.routing.allocation.require.box_type": "warm,cold" # To be used by curator to know where to alocate data.
Finally, my problem is:
To make this “curator step” working I need to apply this custom setting to every new index created automaticly by Graylog.
But I wasn’t able to persist this settings in the “index template”.
Thing I tried to do was:
- Add this settings to “graylog-internal”
- Create a new template only with this settings making match in the same index pattern “graylog_*” to make both settings to merge applying my custom setting
- Clone “graylog-internal” into a new template, add my custom settings in this clone template and delete “graylog-internal”
But everytime Graylog rotates the current index and create a new one, all I get is the template (whatever it is) been rewited by graylog returning to the old settings:
"index": {
"analysis": {
"analyzer": {
"analyzer_keyword": {
"filter": "lowercase",
"tokenizer": "keyword"
}
}
}
}
}
And then a new index created based in those old settings.
Is there a way to append my custom settings somewhere in Graylog to force it to create a new index the right way and avoid it to rewrite my template?
Sorry about my verbose post, I just followed the first rule “Supply as much information as possible” listed here: Questions and You: A guide to getting an answer