Skip to content

Commit

Permalink
Workaround the dashboards' reliance on types (#4218)
Browse files Browse the repository at this point in the history
Kibana still relies on types, and works around it by setting `index.mapping.single_type=false`
when creating the `.kibana` index. If the Beats dashboards are inserted before this index
is created, however, the import will fail. This adds `single_type=false` when creating the
`.kibana` index.

This is a temporary solution until Kibana removes types from its usage and we have an API
to index the dashboards.
  • Loading branch information
tsg authored and andrewkroh committed May 5, 2017
1 parent 47ddf37 commit 3a0d1db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libbeat/dashboards/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ func (imp Importer) Import() error {
// some index properties which are needed as a workaround for:
// https://github.com/elastic/beats-dashboards/issues/94
func (imp Importer) CreateKibanaIndex() error {
imp.client.CreateIndex(imp.cfg.KibanaIndex, nil)
imp.client.CreateIndex(imp.cfg.KibanaIndex,
common.MapStr{
"settings": common.MapStr{
"index.mapping.single_type": false,
},
})
_, _, err := imp.client.CreateIndex(imp.cfg.KibanaIndex+"/_mapping/search",
common.MapStr{
"search": common.MapStr{
Expand Down

0 comments on commit 3a0d1db

Please sign in to comment.