Kibana: Error trying to make an existing index pattern the default

Created on 28 Jun 2016  路  7Comments  路  Source: elastic/kibana

Kibana version: 5.0.0-alpha4 (RC)

OS version: OS X

Original install method (e.g. download page, yum, from source, etc.): download page

Description of the problem including expected versus actual behavior:

Some background info: when you install a Beat, you have the option to run a script that loads the associated Kibana dashboards and index patterns by inserting docs in the .kibana index. The script creates "index patterns" in Kibana, but doesn't set them as default. After opening Kibana, you get this screen (expected):

screen shot 2016-06-28 at 18 51 16

It used to be that you could click on the metricbeat-* link to the left, mark it as default, and go on with your day. With alpha4, however, clicking on metricbeat-* results in a an error:

screen shot 2016-06-28 at 18 53 02
The only way out of this situation is to create a new index that overwrites the `metricbeat-* index pattern, but that's not ideal because we lose some defined formatters.

This is not necessarily a Kibana issue and it's more like Beats fault for messing with the Kibana index, but for the getting started experience I'd like to fix it somehow.

I see two potential solutions:

  • in Kibana, allow setting the default index, like the old behavior was
  • in the Beats loading script, check if there's only one index pattern and if yes, mark it as the default

Steps to reproduce:

  1. Download and uncompress metricbeat
  2. Go to the kibana subfolder, run ./import_dashboards.sh
  3. Open/Refresh Kibana, try to make the metricbeat-* index pattern the default
blocker bug v5.0.0-beta1

Most helpful comment

Part of me thinks we should just automatically set a default if we detect that index patterns exist, but there's no default. Eventually we're gonna remove that sidebar from the pattern creation page, and then users will be screwed again unless they know the exact url to type in to get to an existing index pattern's page. Lots of other stuff breaks in Kibana if there's no default we should just add one.

All 7 comments

@tsg good point, this is definitely a regression. I also ran into this issue once when I somehow removed my default setting, but I couldn't reproduce it.

@tylersmalley What do you think the right solution is here? Maybe we can change this line to only redirect for the root indices url instead of all subsections since this line handles redirects for non-existent index patterns anyway?

Part of me thinks we should just automatically set a default if we detect that index patterns exist, but there's no default. Eventually we're gonna remove that sidebar from the pattern creation page, and then users will be screwed again unless they know the exact url to type in to get to an existing index pattern's page. Lots of other stuff breaks in Kibana if there's no default we should just add one.

Bumping the priority on this since it's a regression.

Opened a PR to address this issue: https://github.com/elastic/kibana/pull/7588

The PR has been merged. After playing around with a couple scenarios, I ended up solving the regression instead of altering the functionality for the default index.

Many thanks @tylersmalley for the quick fix.

@epixa I assume it's too late for including it in alpha4?

@tsg Yeah, we'll need to keep the workaround in the blog post for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ynux picture ynux  路  3Comments

cafuego picture cafuego  路  3Comments

timroes picture timroes  路  3Comments

MaartenUreel picture MaartenUreel  路  3Comments

treussart picture treussart  路  3Comments