I am attempting to create an index pattern through the api or by uploading a dashboard. I am using Kibana version 6.1.0 in a kubernetes cluster. After I import the dashboard I get errors on saying "Could not locate the visualization (id: #)" and the dependent index has not been created.
I've tried a curl statement: curl -X POST -H "kbn-xsrf: true" http://localhost:5601/api/saved_objects/index-pattern/test -d '{"version": 1,"attributes":{"title":"test-*"}}'
but get the error: {"statusCode":400,"error":"Bad Request","message":"child "attributes" fails because ["attributes" is required]. \"{"version":1,":attributes":;{"title":"test-*"}\" is not allowed","validation":{"source":"payload","key":["attributes","{"version":1,"attributes":{"title":"test-*"}}"]}}
I would suggest creating an index pattern manually and then searching for it. This will show you the expected JSON shape of an index pattern. You can then use that example as the basis for your own.
I created the index pattern, created a search, made sure I got hits, saved it, exported it, restarted my cluster, replaced the uuid _id and index with “test-*” but the index is not created when I try to re-import. I get a pop up that says:
The following saved objects use index patterns that do not exist. Please select the index patterns you’d like to re-associate them with.
If I create the index in Kibana then import the search I still get the same pop up message as before. I can then select the index "test-*" I just created and view the results. That makes me think there is still something wrong with my json or how it is trying to create the index?
I understand that the "{"index":"test-*" in the json is referencing the id of the index but I think the thing I cannot figure out his how to declare that index. I have exported a ton of metricbeat base examples but I still am not finding where this index is actually declared. Is a curl statement what I'm missing?
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.