# How fix “Failed to import index-pattern”

**URL:** <https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020>\
**Category:** Beats\
**Created:** [September 11, 2019, 6:58am UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020 "2019-09-11T06:58:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![111209](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111209/32/47277_2.png) [@111209](https://discuss.elastic.co/u/111209)\
**Post date:** [September 11, 2019, 6:58am UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/1 "2019-09-11T06:58:03Z")

</div>

When i`m try setup metricbeat dashboard i get error.

i run this command:  
// metricbeat setup --dashboards  
and got this error:  
`metricbeat setup --dashboards Loading dashboards (Kibana must be running and reachable) Exiting: Failed to import index-pattern: Failed to load directory /usr/share/metricbeat/kibana/6/index-pattern: error loading /usr/share/metricbeat/kibana/6/index- pattern/metricbeat.json: blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];. Response: {"objects":[{"id":"metricbeat-*","type":"index- pattern","error":{"message":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}}]}`  
i try this :

````
```
https://benjaminknofe.com/blog/2017/12/23/forbidden-12-index-read-only-allow-delete-api-read-only-elasticsearch-indices/

https://discuss.elastic.co/t/forbidden-12-index-read-only-allow-delete-api/110282
```

````

it doesnt help me. in my hard drive im got more then 40% free space i restart elastic, kibana, metricbeat nothing help. all elastick stack installed on one server and metricbeat. also i`m try remove index metricbeat\* - not help pls help !

---

<div class="post-metadata">

**Author:** ![Michal\_Pristas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michal_pristas/32/46639_2.png) [@Michal\_Pristas](https://discuss.elastic.co/u/Michal_Pristas)\
**Post date:** [September 11, 2019, 12:25pm UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/2 "2019-09-11T12:25:16Z")

</div>

can you share your filebeat config especially the way how your Kibana endpoint is configured  
and also Kibana config would be useful to see if kibana is secured...

---

<div class="post-metadata">

**Author:** ![111209](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111209/32/47277_2.png) [@111209](https://discuss.elastic.co/u/111209)\
**Post date:** [September 11, 2019, 1:03pm UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/3 "2019-09-11T13:03:25Z")

</div>

hi ! thanks for answer.  
I have problem with metricbeat not filebeat.  
my metricbeat config:

```
metricbeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
setup.kibana:

  
  host: "92.145.4.42:5601"

output.elasticsearch:
  hosts: ["92.145.4.42:9200"]
processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~

```

my Kibana config:  
# Kibana is served by a back end server. This setting specifies the port to use.  
server.port: 5601

```
server.host: "0.0.0.0"

elasticsearch.hosts: ["http://92.145.4.42:9200"]

```

that is all .

---

<div class="post-metadata">

**Author:** ![Ryne\_Keel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ryne_keel/32/42827_2.png) [@Ryne\_Keel](https://discuss.elastic.co/u/Ryne_Keel)\
**Post date:** [September 11, 2019, 1:51pm UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/4 "2019-09-11T13:51:43Z")

</div>

What is your elastic search config like? It reminds me of the kind of error you get if you have security enabled but don't have a user setup for metric beat to manage indexes and write with.

---

<div class="post-metadata">

**Author:** ![111209](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111209/32/47277_2.png) [@111209](https://discuss.elastic.co/u/111209)\
**Post date:** [September 11, 2019, 2:55pm UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/5 "2019-09-11T14:55:35Z")

</div>

This is my elasticsearch config:

cat /etc/elasticsearch/elasticsearch.yml | grep -v '#'

```
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
http.port: 9200
```

---

<div class="post-metadata">

**Author:** ![Ryne\_Keel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ryne_keel/32/42827_2.png) [@Ryne\_Keel](https://discuss.elastic.co/u/Ryne_Keel)\
**Post date:** [September 11, 2019, 3:23pm UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/6 "2019-09-11T15:23:20Z")

</div>

```
GET metricbeat-*/_settings

```

If you run that from dev tools in kibana does it output anything?

---

<div class="post-metadata">

**Author:** ![111209](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111209/32/47277_2.png) [@111209](https://discuss.elastic.co/u/111209)\
**Post date:** [September 12, 2019, 7:04am UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/7 "2019-09-12T07:04:07Z")

</div>

when i`m run this:

> GET metricbeat-\*/\_settings

i get:

```
{
  "metricbeat-6.7.1-2019.09.11" : {
    "settings" : {
      "index" : {
        "codec" : "best_compression",
        "mapping" : {
          "total_fields" : {
            "limit" : "10000"
          }
        }, ......

```

---

<div class="post-metadata">

**Author:** ![111209](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111209/32/47277_2.png) [@111209](https://discuss.elastic.co/u/111209)\
**Post date:** [September 13, 2019, 12:50pm UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/8 "2019-09-13T12:50:25Z")

</div>

Ohh.. So i cant solve this issue ?  
Can i try something else ?  
Can i config metricbeats for use some other index ? , not metricbeat\* which - broken.  
Or can i some how purge elastic index ?

---

<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:** [October 11, 2019, 2:50pm UTC](https://discuss.elastic.co/t/how-fix-failed-to-import-index-pattern/199020/9 "2019-10-11T14:50:31Z")

</div>

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