Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-importing saved objects when index pattern has been deleted is not letting the user re-create index pattern. #15981

Closed
liza-mae opened this issue Jan 11, 2018 · 8 comments · Fixed by #16004
Labels
blocker bug Fixes for quality problems that affect the customer experience v6.2.0

Comments

@liza-mae
Copy link
Contributor

Kibana version: 6.1.2 BC1

Elasticsearch version: 6.1.2 BC1

Server OS version: Ubuntu tar

Browser version: Chrome Latest

Browser OS version: OSX

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

Description of the problem including expected versus actual behavior:

If index pattern does not exist, re-importing saved objects after deleting visualizations doesn't prompt you to create the index pattern. Instead kibana shows newid undefined error.

Steps to reproduce:

  1. Install Elasticsearch, Kibana and Metricbeat and import Metricbeat dashboards.
  2. Delete metericbeat-* pattern index.
  3. Go to saved objects and export everything.
  4. In saved objects, delete everything under visualizations.
  5. Re-import json file saved in step 2. Kibana shows newid undefined error.

screenshot at jan 10 19-07-53

screenshot at jan 10 19-07-20

@liza-mae liza-mae added bug Fixes for quality problems that affect the customer experience :Management labels Jan 11, 2018
@bhavyarm
Copy link
Contributor

@liza-mae @LeeDr this is same in 6.0.0. Exact same errors.

@bhavyarm
Copy link
Contributor

bhavyarm commented Jan 11, 2018

In the above scenario - if I don’t skip the import and associate the saved object with say logstash index pattern - in the dashboard I see this: just beat-name without any link to recreate index pattern.
beat_name

In 6.0 - beat.name is a link and it goes to an empty page.
diff_index_pattern

@rashmivkulkarni
Copy link
Contributor

on 5.6.6 when I perform the above steps, I get the following
screen shot 2018-01-11 at 11 09 39 am

error in console

commons.bundle.js?v=15605:38 Error: Could not locate that index-pattern (id: metricbeat-*), [click here to re-create it](#/management/kibana/index?id=metricbeat-%252A&name=)
    at updateFromElasticSearch (kibana.bundle.js?v=15605:227)
    at kibana.bundle.js?v=15605:227
    at processQueue (commons.bundle.js?v=15605:38)
    at commons.bundle.js?v=15605:38
    at Scope.$eval (commons.bundle.js?v=15605:39)
    at Scope.$digest (commons.bundle.js?v=15605:39)
    at Scope.$apply (commons.bundle.js?v=15605:39)
    at done (commons.bundle.js?v=15605:37)
    at completeRequest (commons.bundle.js?v=15605:37)
    at XMLHttpRequest.xhr.onload (commons.bundle.js?v=15605:37)

@liza-mae
Copy link
Contributor Author

No link to recreate screenshot from dashboards ...

screenshot at jan 10 19-42-19

@liza-mae
Copy link
Contributor Author

If you select a different index pattern you get a bunch of errors on the screen

screenshot at jan 11 12-02-37

@LeeDr
Copy link

LeeDr commented Jan 11, 2018

@liza-mae that last set of errors makes sense. It's telling you that the saved object (visualization probably) references a field which isn't in the index pattern you selected. It doesn't go so far as to only give you the choice of selecting an index pattern which contains all the fields in use by the visualization (although that would be great if it did).

@liza-mae
Copy link
Contributor Author

@LeeDr Yes it should error since it is for a index pattern that does not contain all the fields, I think the issue here is to error more gracefully. Does not look good to show that many errors on top, Bhavya said she has an issue open on it, will reference.

Also, if some error checking can be done beforehand when the selected pattern does not match, maybe just show an error dialog and not allow the operation to go through or don't show them as selections in the first place.

@chrisronline
Copy link
Contributor

I have a fix coming soon, but we're only backporting to 6.x because there is a workaround. Users just need to ensure the intended index pattern exists before trying to import objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience v6.2.0
Projects
None yet
5 participants