Using index-pattern ID is not clear at all.
For example i have a problem - i have dasboards, that use "winlogbeat-*" index-pattern and than i delete it (during trying fixing a problem). And that create it again. Now all my dashboards and visualisations are broken.
"Could not locate that index-pattern (id: winlogbeat-*), [click here to re-create it]" but this index-pattern exist!
I even can't import saved searches in JSON format - it generates same error. You cant "click here", because it is not a link. And re-creation of the same index-pattern doesn't help.
So, my questions:
Why i cant use index-pattern name instead of id?
Where can i find hardcoded IDs in dashboards, for example and change it?
How can fix this problem and not re-create every visualisation and search?
I add more screenshots to better understand the problem.
I have this error, if i open any built-in visualisation or search through "Saved objects" and close it.
And if i click a link to create that index-pattern, i will get an error - it already exist. So i coundn't do anything.
Replied to your ticket at github. Let's continue discussion here to get it more visible to other people who may experience this as well. Happy to help if you're still having issues with that.
So now you have a new windlogbeat-* index pattern and it has a new ID. If you open this index pattern in Kibana you should observe this new ID in the URL. Then you can go to the Management -> Saved Objects and edit the source of broken SO (update index pattern ID to the new one, see references field).
I also double-check all other fields - there is no ID.
So, where it can be hardcoded?
Hmm, I think I see your problem now. So your visualization is actually easy to fix it seems since it's referring to an index pattern with a custom ID ( winlogbeat-*, if you don't specify custom ID Kibana will generate UUID-like ID instead). So I guess your issue here is that when you re-created an index pattern for winlogbeat-*, you didn't specify this custom ID and Kibana generated a random UUID for it. Can you try to delete index pattern (assuming you don't have anything important in it, like scripted fields, otherwise - back it up first) and re-create it with a custom ID (see gif below):
Thank you!That helps! By the way, now i broke another visualisations, that uses IDs)
But it is not a big problem, i hope i will fix it by exporting in JSON - script renaming and importing again. By thae way - is there is an option to export in json pretty readble format instead of Ndjson?
So, i hope that Elastic team separate this termins soon in https://github.com/elastic/kibana/issues/44955
So, i think it is better to move all index-patterns to IDs and not custom strings?What is best practice?
Yeah, we'll try to make index-pattern story less confusing for sure.
So, i think it is better to move all index-patterns to IDs and not custom strings?What is best practice?
I don't think there is a best pracise necessarily because it depends on your usage pattern. Some people prefer to use "human readable" IDs or plan to delete/create index patterns without breaking all dependent visualizations. But at the same time custom IDs are not "unique" enough that may lead to collisions when you decide to import index pattern that has exactly same ID (say your collegue also uses human readable names for index patterns). So since we're in a process of improving this, I'd advice you to use approach that works best for you right now.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.