# Unable to import dashboard with script and UI

**URL:** <https://discuss.elastic.co/t/unable-to-import-dashboard-with-script-and-ui/80354>\
**Category:** Kibana\
**Created:** [March 28, 2017, 7:21pm UTC](https://discuss.elastic.co/t/unable-to-import-dashboard-with-script-and-ui/80354 "2017-03-28T19:21:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![2rock](https://avatars.discourse-cdn.com/v4/letter/2/e480ec/32.png) [@2rock](https://discuss.elastic.co/u/2rock)\
**Post date:** [March 28, 2017, 7:21pm UTC](https://discuss.elastic.co/t/unable-to-import-dashboard-with-script-and-ui/80354/1 "2017-03-28T19:21:23Z")

</div>

Hello,

I juste installed ELK stack, on just one server. And a sent log with metricbeat and filebeat from another server.

Everything is ok. But when I want to import dashboard I run the script and it seems to be good :

`Create temporary directory /tmp/tmp693935868
Downloading https://artifacts.elastic.co/downloads/beats/beats-dashboards/beats-dashboards-5.2.2.zip
Unzip archive /tmp/tmp693935868
/tmp/tmp693935868/beats-dashboards-5.2.2/filebeat
Import directory /tmp/tmp693935868/beats-dashboards-5.2.2/filebeat/index-pattern
Import index to /.kibana/index-pattern/filebeat-* from /tmp/tmp693935868/beats-dashboards-5.2.2/filebeat/index-pattern/filebeat.json
No directory /tmp/tmp693935868/beats-dashboards-5.2.2/filebeat/dashboard
/tmp/tmp693935868/beats-dashboards-5.2.2/heartbeat
/tmp/tmp693935868/beats-dashboards-5.2.2/metricbeat
/tmp/tmp693935868/beats-dashboards-5.2.2/packetbeat
/tmp/tmp693935868/beats-dashboards-5.2.2/winlogbeat
`

But in Kibana there is nothing...

 ![](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d91292042a92b0939df263474719be77a9716523.PNG)

When I tried to use the UI import button it's the same, none of the files I tried works.

So I look into the json files in the beats-dashboards-5.2.2.zip to see the structure and it's a bit different to the structure of an exported dashboard (same for visualization and search)

Exemple of an exported dashboard :

[code][  
{  
"\_id": "97115520-13ea-11e7-9dcf-33e967d4d9f5",  
"\_type": "dashboard",  
"\_source": {  
"hits": 0,  
"timeRestore": false,  
"description": "",  
"uiStateJSON": "{"P-2":{"vis":{"params":{"sort":{"columnIndex":null,"direction":null}}}},"P-4":{"vis":{"params":{"sort":{"columnIndex":null,"direction":null}}}},"P-5":{"vis":{"params":{"sort":{"columnIndex":null,"direction":null}}}}}",  
"panelsJSON": "[{"col":4,"id":"Container-CPU-usage","panelIndex":2,"row":1,"size\_x":9,"size\_y":4,"type":"visualization"},{"col":1,"id":"System-Navigation","panelIndex":3,"row":1,"size\_x":3,"size\_y":4,"type":"visualization"},{"col":1,"id":"Container-Memory-stats","panelIndex":4,"row":5,"size\_x":12,"size\_y":3,"type":"visualization"},{"col":1,"id":"Container-Block-IO","panelIndex":5,"row":8,"size\_x":12,"size\_y":4,"type":"visualization"}]",  
"title": "CPU/Memory per container",  
"optionsJSON": "{"darkTheme":false}",  
"version": 1,  
"kibanaSavedObjectMeta": {  
"searchSourceJSON": "{"filter":[{"query":{"query\_string":{"query":"\*","analyze\_wildcard":true}}}]}"  
}  
}  
}

][/code]

Exemple of a dasboard in the zip file:

`{
  "hits": 0, 
  "timeRestore": false, 
  "description": "", 
  "uiStateJSON": "{\"P-2\":{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}},\"P-4\":{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}},\"P-5\":{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}}", 
  "panelsJSON": "[{\"col\":4,\"id\":\"Container-CPU-usage\",\"panelIndex\":2,\"row\":1,\"size_x\":9,\"size_y\":4,\"type\":\"visualization\"},{\"col\":1,\"id\":\"System-Navigation\",\"panelIndex\":3,\"row\":1,\"size_x\":3,\"size_y\":4,\"type\":\"visualization\"},{\"col\":1,\"id\":\"Container-Memory-stats\",\"panelIndex\":4,\"row\":5,\"size_x\":12,\"size_y\":3,\"type\":\"visualization\"},{\"col\":1,\"id\":\"Container-Block-IO\",\"panelIndex\":5,\"row\":8,\"size_x\":12,\"size_y\":4,\"type\":\"visualization\"}]", 
  "title": "CPU/Memory per container", 
  "optionsJSON": "{\"darkTheme\":false}", 
  "version": 1, 
  "kibanaSavedObjectMeta": {
    "searchSourceJSON": "{\"filter\":[{\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}}}]}"
  }
}`

It's juste the source part. The id and type part are missing. Is it possible that this is the reason of my problem?

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [March 28, 2017, 8:50pm UTC](https://discuss.elastic.co/t/unable-to-import-dashboard-with-script-and-ui/80354/2 "2017-03-28T20:50:45Z")

</div>

> [@2rock](#):
>
> But in Kibana there is nothing...

It looks like you ran the `import_dashboard` script from the Filebeat install path, and it seems to be expected that all that does is install an index pattern (for `filebeat-*`). I guess the name of the script is misleading. I tried out running Filebeat's import script and it looks like I got the same output you saw.

Since you have metricbeat as well, try running the import script that's located in the Metricbeat install path. That should create some actual saved searches, visualizations and dashboards. I ran the Metricbeat install script, I saw much more output. Too much to put here 🙂

> [@2rock](#):
>
> It's juste the source part. The id and type part are missing. Is it possible that this is the reason of my problem?

The script programmatically installs the objects into the `.kibana` index. `_id` is generated automatically by Elasticsearch, and `_type` is part of the query URL of the POST request. The source you're looking at is just the JSON body used for the POST request.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 25, 2017, 8:51pm UTC](https://discuss.elastic.co/t/unable-to-import-dashboard-with-script-and-ui/80354/3 "2017-04-25T20:51:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
