# Error while fetching resource Kibana APM

**URL:** https://discuss.elastic.co/t/error-while-fetching-resource-kibana-apm/315284
**Category:** Elasticsearch
**Created:** [September 27, 2022, 3:30pm UTC](https://discuss.elastic.co/t/error-while-fetching-resource-kibana-apm/315284 "2022-09-27T15:30:43Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![danksim](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danksim](https://discuss.elastic.co/u/danksim)
#### Post date: [September 27, 2022, 4:07pm UTC](https://discuss.elastic.co/t/error-while-fetching-resource-kibana-apm/315284/2 "2022-09-27T16:07:55Z")

</div>

Ah my apologies. There is a `kubernetes job` that runs the following legacy `apm-server` `setup` command. This is a snippet from `helmfile sync`:

```auto
        args:
        - "setup"
        - "-e"
        - "--index-management"
        - "-E=setup.template.pattern='apm-*'"
        - "-E=setup.template.name='apm-ns'"
        - "-E=setup.template.overwrite='true'"
        - "-E=setup.template.settings={'index.max_docvalue_fields_search': '20000','index.number_of_shards': '6', 'index.refresh_interval': '60s','index.lifecycle.name': 'apm-ilm','index.lifecycle.rollover_alias': 'apm-index', 'index.translog.durability': 'async'}"
        - "-E=setup.template.append_fields=[{name:'labels.queue',type:'keyword'},{name:'labels.topic',type:'keyword'},{name:'http.request.headers',type:'object',dynamic:'true'},{name:'http.request.headers.Encrypted-User-Uuid',type:'keyword'},{name:'http.request.headers.X-Encrypted-User-Uuid',type:'keyword'},{name:'http.request.headers.X-App-Name',type:'keyword'}]"
        - "-E=output.elasticsearch.index='apm-%!{(MISSING)[kubernetes][namespace]}-%!{(MISSING)+MM.dd.YYYY}'"
        - "-E=output.elasticsearch.username=${ELK_USERNAME}"
        - "-E=output.elasticsearch.password=${ELK_PASSWORD}"
        - "-E=output.elasticsearch.ssl.certificate=/etc/elk/CA/tls.crt"
        - "-E=output.elasticsearch.ssl.key=/etc/elk/CA/tls.key"
        - "-E=output.elasticsearch.ssl.certificate_authorities=['/etc/elk/CA/ca.crt']"
        - "-E=output.elasticsearch.hosts=['https://elastic-stack-coordinator:9200']"

```

If I were to implement the following [fix](https://discuss.elastic.co/t/failed-to-load-resource-the-server-responded-with-a-status-of-500-internal-server-error/225612/8), how would I use the `setup` command?

 ![Screen Shot 2022-09-27 at 12.13.33 PM](https://us1.discourse-cdn.com/elastic/original/3X/b/9/b93225b0c7daea3c20967078c47e472c51012807.png)  
It looks like `index.indices` but then it's a list with `- index`. Am I able to do `-E=output.elasticsearch.index.indices.index=<some-index>`?

---

_[View the full topic](https://discuss.elastic.co/t/error-while-fetching-resource-kibana-apm/315284)._
