In our env. We have an AWS OpenSearch integrated to multiple env. and it receive logs from hundreds of indices. Creating index pattern for each of them manually by going into stack-management and creating an index for the logs is getting a bit tedious. I have searched a lot of docs. but, couldn’t find any api’s for creating the index patterns. Could you help me here.
I found below info. from one of the post. Index is getting created with the below api call, Index pattern is getting created in discover tab but, when I check the index on index pattern page of stack-management, it is empty and it is not displaying any logs on discover tab.
And also, if I run the same command with different index name, previously created Index is missing.
POST .kibana/_doc/index-pattern:<index-name>
{
“type” : “index-pattern”,
“index-pattern” : {
“title”: “index-*”, —> pattern to match index
“timeFieldName”: “execution_time” —> Time field
}
}
I noticed there was a thread here: Problem creating index pattern from CURL where people talked about doing it on Open Source Elastic and Kibana. I imagine some of the steps might be the same. Also, there’s a github issue talking about this briefly as well:
You might find some answers between those two threads. I’m still trying to recreate their steps.