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

Importing reindexed saved objects is not working. #14592

Closed
bhavyarm opened this issue Oct 25, 2017 · 11 comments
Closed

Importing reindexed saved objects is not working. #14592

bhavyarm opened this issue Oct 25, 2017 · 11 comments
Labels
blocker bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team v6.0.0-rc2

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Oct 25, 2017

Kibana version: 6.0.0_rc2 BC2

Elasticsearch version: 6.0.0_rc2 BC2

Server OS version: darwin_x86_64

Browser version: chrome latest

Browser OS version: OS X

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

Description of the problem including expected versus actual behavior: Kibana isn't adding visualization: to dashboards in saved objects json after reindexing. As a result - importing doesn't work.

  1. I got 5.6.3 ES/kibana/Metricbeat/packebeat stack set up, loaded data(also added data from shakespeare and bank from the tutorial), loaded beats dashboards.
  2. Reindexed .kibana
  3. Exported saved objects.json
  4. Got the same stack going for 6.0.0_rc2_bc1
  5. Created the same index patterns
  6. Imported the exported .json
  7. Associated saved objects with the appropriate index patterns in 6.0 (ignored filebeat/logstash)
  8. Kibana doesn't load all the saved objects.

This is the result of my query in console
GET .kibana/_search?size=200

console.json.zip

One of the errors for the metricbeat saved visualization:
metric_beat_saved_object

@bhavyarm bhavyarm added :Management Team:Operations Team label for Operations Team bug Fixes for quality problems that affect the customer experience v6.0.0-rc2 labels Oct 25, 2017
@bhavyarm
Copy link
Contributor Author

@LeeDr LeeDr added the blocker label Oct 25, 2017
@LeeDr
Copy link

LeeDr commented Oct 25, 2017

@epixa @jimgoodwin I added a blocker label, but I'm not sure it needs to block rc2, unless we think this is an important case people need to test prior to GA. I'm thinking it should just block 6.0 GA.

@epixa
Copy link
Contributor

epixa commented Oct 25, 2017

We want rc2 to be a legitimate candidate, so any GA blockers should block rc2

@tylersmalley
Copy link
Contributor

@bhavyarm, can I have the saved objects you were attempting to import into the 6.0 stack?

@rhoboat
Copy link

rhoboat commented Oct 26, 2017

The exported savedObjects JSON for both reindexed and non-reindexed .kibana looks the same to me, as you can see (only some meta was added):
Before reindex:

[
  {
    "_id": "AV9WQ08Wd5oVlmSgTrZ5",
    "_type": "dashboard",
    "_source": {
      "title": "Twitter Dash",
      "hits": 0,
      "description": "Dashboard of twitter data",
      "panelsJSON": "[{\"size_x\":6,\"size_y\":3,\"panelIndex\":1,\"type\":\"visualization\",\"id\":\"AV9WQvk5d5oVlmSgTrYh\",\"col\":1,\"row\":1}]",
      "optionsJSON": "{\"darkTheme\":false}",
      "uiStateJSON": "{}",
      "version": 1,
      "timeRestore": false,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"filter\":[{\"query\":{\"match_all\":{}}}],\"highlightAll\":true,\"version\":true}"
      }
    }
  },
  {
    "_id": "AV9WQvk5d5oVlmSgTrYh",
    "_type": "visualization",
    "_source": {
      "title": "Twitter Viz",
      "visState": "{\"title\":\"Twitter Viz\",\"type\":\"pie\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":false,\"type\":\"pie\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"post_date\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}",
      "uiStateJSON": "{}",
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"AV9WQL85d5oVlmSgTrOc\",\"query\":{\"match_all\":{}},\"filter\":[]}"
      }
    }
  }
]

after reindex:

[
  {
    "_id": "AV9WQ08Wd5oVlmSgTrZ5",
    "_type": "dashboard",
    "_source": {
      "hits": 0,
      "description": "Dashboard of twitter data",
      "uiStateJSON": "{}",
      "title": "Twitter Dash",
      "timeRestore": false,
      "version": 1,
      "panelsJSON": "[{\"size_x\":6,\"size_y\":3,\"panelIndex\":1,\"type\":\"visualization\",\"id\":\"AV9WQvk5d5oVlmSgTrYh\",\"col\":1,\"row\":1}]",
      "optionsJSON": "{\"darkTheme\":false}",
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"filter\":[{\"query\":{\"match_all\":{}}}],\"highlightAll\":true,\"version\":true}"
      }
    },
    "_meta": {
      "savedObjectVersion": 2
    }
  },
  {
    "_id": "AV9WQvk5d5oVlmSgTrYh",
    "_type": "visualization",
    "_source": {
      "description": "",
      "uiStateJSON": "{}",
      "title": "Twitter Viz",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"AV9WQL85d5oVlmSgTrOc\",\"query\":{\"match_all\":{}},\"filter\":[]}"
      },
      "visState": "{\"title\":\"Twitter Viz\",\"type\":\"pie\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":false,\"type\":\"pie\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"post_date\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}"
    },
    "_meta": {
      "savedObjectVersion": 2
    }
  }
]

I'd wager that even just exporting any savedObjects from 5.6.3 to 6.0.0 is a problem. Testing this theory now.

@rhoboat
Copy link

rhoboat commented Oct 26, 2017

I'm able to import dashboards and visualizations from 5.6.3 to 6.0.0, so as per Tyler's request, we do need the saved objects that you were attempting to import. :)

@bhavyarm
Copy link
Contributor Author

bhavyarm commented Oct 26, 2017

Here you go:
export.json.zip

Please ignore the logstash index pattern in 5.6.3 - I didn't import it to 6.0. Cheers!

@jimgoodwin
Copy link

Please keep me updated about this, if we don't have a fix and an RC today, lets document this as a known issue and we'll fix it in the GA.

@tylersmalley
Copy link
Contributor

tylersmalley commented Oct 26, 2017

@jimgoodwin, I see the issue and working on a solution.

The search is failing to import due to the index pattern missing, and prompting the user to select an index pattern. Then, a dashboard/visualization is attempting to import and can not locate the saved search.

@tylersmalley
Copy link
Contributor

cc @chrisronline

@tylersmalley
Copy link
Contributor

Fixed in #14625

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 Team:Operations Team label for Operations Team v6.0.0-rc2
Projects
None yet
Development

No branches or pull requests

6 participants