# Heartbeat automatic import dashboards failed

**URL:** <https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [November 30, 2021, 3:58pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572 "2021-11-30T15:58:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [November 30, 2021, 3:58pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/1 "2021-11-30T15:58:13Z")

</div>

Hey there,  
using ELK v.7.15.2 I was trying to import Heartbeat dashboards into Kibana.  
I set the following parameters:

```auto
setup.dashboards.enabled: true

```

but I am facing the following error:

> Exiting: Error importing Kibana dashboards: fail to import the dashboards in Kibana: Error importing directory /usr/share/heartbeat/kibana: Failed to import dashboard: The directory /usr/share/heartbeat/kibana/7 is empty, nothing to import

Into the /kibana/7 folder there is a subfolder named dashboard with a ndjson file. is that correct? I cannot find any clear documentation about that.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [November 30, 2021, 4:06pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/2 "2021-11-30T16:06:05Z")

</div>

Hi @rschirin

Can you comment that back out and just try

`heartbeat setup -e`

Which will do the whole setup (which only needs to be run once)

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [November 30, 2021, 4:12pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/3 "2021-11-30T16:12:06Z")

</div>

I cannot do that since I am using containers (with docker-compose) and automatic deploy of different Heartbeat instances

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [November 30, 2021, 5:59pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/4 "2021-11-30T17:59:06Z")

</div>

What version of hearbeat are you using?

Recent versions of heartbeat do not have dashboards.. the `./kibana` directory is empty. I checked all the way back to 7.7.0, i.e. there are no dashboards to load / setup.

Just On a side note for beats setup.. you may not want to load the dashboards with every container deploy either that is wasteful as well / slows down the deployment (example pretty heavy for filebeat / metricbeat)... that said it should work..

We see some customer with a pattern such as deploy a "canary/config" deployment that loads / setups and then the actual "workload" containers that just run.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [November 30, 2021, 6:25pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/5 "2021-11-30T18:25:44Z")

</div>

I am using 7.15 heartbeat version.  
Since ES disks will be permanent, probably I will use the "canary approach" at least at the first time. If I try to use  
`heartbeat setup -e`  
should I populate any folder or similar?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [November 30, 2021, 7:08pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/6 "2021-11-30T19:08:32Z")

</div>

No, it looks like for heartbeat `setup` just sets up the index template no need to populate anything.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [November 30, 2021, 7:17pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/7 "2021-11-30T19:17:47Z")

</div>

Sorry @stephenb , so I am not understanding the reason I should use `setup` parameter 😭

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [November 30, 2021, 7:25pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/8 "2021-11-30T19:25:36Z")

</div>

Every beat has a `setup` command.

The `setup` command loads and setups up the associated assets (index templates, ingest pipelines, dashoard, ML Jobs etc..etc..) in kibana and Elasticsearch.

It really only needs to be run once per version of the beat. (or if you make some other significant changes but that is not really the case for heartbeat)

You run setup once... to set up the assets and then deploy 1... or 1,000 heartbeats

Some beats and modules have many assets (filebeat) some have few heartbeat.

See the docs here

> **[Heartbeat quick start: installation and configuration | Heartbeat Reference...](https://www.elastic.co/guide/en/beats/heartbeat/current/heartbeat-installation-configuration.html)**

---

<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:** [December 28, 2021, 9:26pm UTC](https://discuss.elastic.co/t/heartbeat-automatic-import-dashboards-failed/290572/9 "2021-12-28T21:26:05Z")

</div>

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