Open masseyke opened 1 month ago
Pinging @elastic/kibana-management (Team:Kibana Management)
@masseyke did you provide any other inputs as part of template creation in the UI? If you can copy the request from the "Request" tab in the summary that would be helpful.
Also, as I believe we are just returning the error that's coming back from ES, what do you think the best way to handle this is? Is there some validation we're missing in the UI?
I just tried reproducing it on serverless. This was from an Observability serverless deployment:
I clicked Project Settings -> Management -> Index Management
I clicked Index Templates -> Create template
I set the name to keith-test
, the Index patterns to *
, and the Priority to 700.
Before clicking Create template, everything looked fine. Here's the request:
PUT _index_template/keith-test
{
"priority": 700,
"template": {},
"index_patterns": [
"*"
],
"data_stream": {}
}
I clicked Create template, and that succeeded. But now if I click on Preview (in the box that popped up), I get this:
{
"statusCode": 400,
"error": "Bad Request",
"message": "index template [simulate_template_rthntap9rzwrmbfm1bbadw] has index patterns [a_fake_index_pattern_that_wont_match_any_indices] matching patterns from existing templates [keith-test] with patterns (keith-test => [*]) that have the same priority [700], multiple index templates may not match during index creation, please use a different priority",
"attributes": {
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "index template [simulate_template_rthntap9rzwrmbfm1bbadw] has index patterns [a_fake_index_pattern_that_wont_match_any_indices] matching patterns from existing templates [keith-test] with patterns (keith-test => [*]) that have the same priority [700], multiple index templates may not match during index creation, please use a different priority"
}
],
"type": "illegal_argument_exception",
"reason": "index template [simulate_template_rthntap9rzwrmbfm1bbadw] has index patterns [a_fake_index_pattern_that_wont_match_any_indices] matching patterns from existing templates [keith-test] with patterns (keith-test => [*]) that have the same priority [700], multiple index templates may not match during index creation, please use a different priority"
}
}
}
I think that a_fake_index_pattern_that_wont_match_any_indices
is coming from kibana and maybe causing the problems?
I went to
Stack Management
->Index Management
, clicked onIndex Templates
, andCreate Template
. Then I created a template that matches index patterns*
. The template was created find, and I was able to use it. But when I clicked on thePreview
tab I got this: