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

Index Pattern Not Preserved In Dashboards Export #23435

Closed
evanfreed opened this issue Sep 24, 2018 · 1 comment
Closed

Index Pattern Not Preserved In Dashboards Export #23435

evanfreed opened this issue Sep 24, 2018 · 1 comment
Assignees
Labels
Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas triage_needed

Comments

@evanfreed
Copy link

Kibana version:
6.4.1

Elasticsearch version:
6.4.1

Server OS version:
OSX (local)

Browser version:
Chrome

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

Describe the bug:
This is an extension of what I mentioned in #22541 (comment) where exporting dashboards and reimporting them was not setting a default index pattern. However, it looks like the export is not finding the pattern anymore which is likely causing the reimport issues (see below).

When using the Rest API to pull down dashboards to save into a file I'm seeing the index-pattern section as having a 404 not found (in previous versions, at least in 6.2.4, this was not the case).

...
{
      "id": "metricbeat-*",
      "type": "index-pattern",
      "error": {
        "statusCode": 404,
        "message": "Not found"
	}
}
...

Steps to reproduce:

  1. Setup ES, Kibana, Metricbeat locally
  2. Import Metricbeat dashboard (metricbeat-6.4.1-darwin-x86_64/kibana/6/dashboard)
curl -XPOST -H 'kbn-xsrf:true' -H 'Content-type:application/json' localhost:5601/api/kibana/dashboards/import -d @Metricbeat-host-overview.json
  1. Export to file (populate ENTER_DASHBOARD_ID with correct ID)
curl -XGET -H 'kbn-xsrf:true' -H 'Content-type:application/json' localhost:5601/api/kibana/dashboards/export?dashboard=ENTER_DASHBOARD_ID > Metricbeat-host-overview-version-2.json
  1. Inspect File for index-pattern.

Expected behavior:
In previous versions when pulling the dashboard you would get associated index-patterns as well. It seems like this behavior has changed or there was a regression of some kind.

I'm not entirely sure if this API makes any additional calls to get the index-patterns but from what I noticed locally, as well as what's mentioned in #20242 (comment), it appears that the api/saved_objects/_find API has suffered a regression

curl -XGET "localhost:9200/api/saved_objects/_find?type=index-pattern&search_fields=title&search=metric*"
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/api/saved_objects/_find] contains unrecognized parameters: [search], [search_fields] -> did you mean [stored_fields]?"}],"type":"illegal_argument_exception","reason":"request [/api/saved_objects/_find] contains unrecognized parameters: [search], [search_fields] -> did you mean [stored_fields]?"},"status":400

This seems like a second issue but I wanted to bring it up in case the export dashboards API leverages it or similar logic.

@bmcconaghy

@bmcconaghy bmcconaghy self-assigned this Sep 24, 2018
@Bargs Bargs added Feature:Dashboard Dashboard related features triage_needed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Sep 25, 2018
@timroes timroes added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 7, 2020
@ThomThomson
Copy link
Contributor

Can confirm that this is no longer an issue, with our extract and inject references logic and the excellent export saved objects API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas triage_needed
Projects
None yet
Development

No branches or pull requests

5 participants