Define Index mapping for time based indexes my_index-%{YYYY-MM-DD}

Is there a way to use define mapping for an index that will be used for all the subsequent indexes with different time stamps?

I am sending logs from Logstash to ES using elasticsearch plugin. In the index configuration I am specifying my_index-%{YYYY-MM-DD}.

When I run this on Kibana:

PUT my_index-*
{
"mappings": {
"_doc": {
"dynamic": true,
"properties": {
"ip_addr": {
"type": "ip"
}
}
}
}
}

I get output error as:
{
"type": "illegal_state_exception",
"reason": "There are no external requests known to support wildcards that don't support replacing their indices"
}

Sure are - https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.