How to convert default index template from 5.6 to 7.9?

Hello,

I have from ELK 5.6 stack this default index template definition:

PUT /_template/mytemplate
{
   "template":".kibana-*",
   "settings":{
      "number_of_shards":1
   },
   "mappings":{
      "config":{
         "properties":{
            "buildNum":{
               "type":"keyword"
            }
         }
      },
      "index-pattern":{
         "properties":{
            "fieldFormatMap":{
               "type":"text"
            },
            "fields":{
               "type":"text"
            },
            "intervalName":{
               "type":"keyword"
            },
            "notExpandable":{
               "type":"boolean"
            },
            "sourceFilters":{
               "type":"text"
            },
            "timeFieldName":{
               "type":"keyword"
            },
            "title":{
               "type":"text"
            }
         }
      },
      "visualization":{
         "properties":{
            "description":{
               "type":"text"
            },
            "kibanaSavedObjectMeta":{
               "properties":{
                  "searchSourceJSON":{
                     "type":"text"
                  }
               }
            },
            "savedSearchId":{
               "type":"keyword"
            },
            "title":{
               "type":"text"
            },
            "uiStateJSON":{
               "type":"text"
            },
            "version":{
               "type":"integer"
            },
            "visState":{
               "type":"text"
            }
         }
      },
      "search":{
         "properties":{
            "columns":{
               "type":"keyword"
            },
            "description":{
               "type":"text"
            },
            "hits":{
               "type":"integer"
            },
            "kibanaSavedObjectMeta":{
               "properties":{
                  "searchSourceJSON":{
                     "type":"text"
                  }
               }
            },
            "sort":{
               "type":"keyword"
            },
            "title":{
               "type":"text"
            },
            "version":{
               "type":"integer"
            }
         }
      },
      "dashboard":{
         "properties":{
            "description":{
               "type":"text"
            },
            "hits":{
               "type":"integer"
            },
            "kibanaSavedObjectMeta":{
               "properties":{
                  "searchSourceJSON":{
                     "type":"text"
                  }
               }
            },
            "optionsJSON":{
               "type":"text"
            },
            "panelsJSON":{
               "type":"text"
            },
            "refreshInterval":{
               "properties":{
                  "display":{
                     "type":"keyword"
                  },
                  "pause":{
                     "type":"boolean"
                  },
                  "section":{
                     "type":"integer"
                  },
                  "value":{
                     "type":"integer"
                  }
               }
            },
            "timeFrom":{
               "type":"keyword"
            },
            "timeRestore":{
               "type":"boolean"
            },
            "timeTo":{
               "type":"keyword"
            },
            "title":{
               "type":"text"
            },
            "uiStateJSON":{
               "type":"text"
            },
            "version":{
               "type":"integer"
            }
         }
      },
      "url":{
         "properties":{
            "accessCount":{
               "type":"long"
            },
            "accessDate":{
               "type":"date"
            },
            "createDate":{
               "type":"date"
            },
            "url":{
               "type":"text",
               "fields":{
                  "keyword":{
                     "type":"keyword",
                     "ignore_above":2048
                  }
               }
            }
         }
      },
      "server":{
         "properties":{
            "uuid":{
               "type":"keyword"
            }
         }
      },
      "timelion-sheet":{
         "properties":{
            "description":{
               "type":"text"
            },
            "hits":{
               "type":"integer"
            },
            "kibanaSavedObjectMeta":{
               "properties":{
                  "searchSourceJSON":{
                     "type":"text"
                  }
               }
            },
            "timelion_chart_height":{
               "type":"integer"
            },
            "timelion_columns":{
               "type":"integer"
            },
            "timelion_interval":{
               "type":"keyword"
            },
            "timelion_other_interval":{
               "type":"keyword"
            },
            "timelion_rows":{
               "type":"integer"
            },
            "timelion_sheet":{
               "type":"text"
            },
            "title":{
               "type":"text"
            },
            "version":{
               "type":"integer"
            }
         }
      }
   }
}

If I try to set it in 7.9 I get the "Root mapping definition has unsupported parameters" error.
It seems that multiple mappings (config, index-pattern, visualization, ...) are not supported this way anymore.
How do I set the same in 7.9 ?

I would suggest that altering the Kibana template/mapping is not a good thing.

What problem are you trying to resolve by doing this?

The ELK server was handed over to me when my colleague left and I need to upgrade it as I need a feature not available in the old version. I admit I don't understand it much so I want to keep it the same way as it was configured.

Again, I would suggest that is not the best idea.

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