# Recovered from panic while fetching 'azure/app\_insights' for host ''. \[AZURE\]

**URL:** <https://discuss.elastic.co/t/recovered-from-panic-while-fetching-azure-app-insights-for-host-azure/263113>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [February 3, 2021, 11:19am UTC](https://discuss.elastic.co/t/recovered-from-panic-while-fetching-azure-app-insights-for-host-azure/263113 "2021-02-03T11:19:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miki\_haiat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miki_haiat/32/83361_2.png) [@miki\_haiat](https://discuss.elastic.co/u/miki_haiat)\
**Post date:** [February 3, 2021, 11:19am UTC](https://discuss.elastic.co/t/recovered-from-panic-while-fetching-azure-app-insights-for-host-azure/263113/1 "2021-02-03T11:19:06Z")

</div>

Hey,

I'm trying to send app\_insights metric via metric beat to elastic.  
I can't see any reference to 'host' in the [app\_insight docs](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-azure-app_state.html)

Any suggestion on how to solve this panic error

I found the cause of the error, where the host is set in the configuration file ?

```auto
2021-02-03T16:08:07.607+0200 DEBUG [module] module/wrapper.go:189 Starting metricSetWrapper[module=azure, name=app_insights, **host=]**

```

This is my configuration

```auto
  > metricbeat.modules:
> - module: azure
> metricsets:
> - app_insights
> enabled: true
> period: 10s
> application_id: ' ******'
> api_key: ' ****'
> metrics:
> - id: ["requests/count", "requests/duration","performanceCounters/processorCpuPercentag"]
> segment: "request/name"
> aggregation: ["sum"]

```

stack trace

```auto
> ERROR runtime/panic.go:212 recovered from panic while fetching 'azure/app_insights' for host ''. Recovering, but please report this. {"panic": "runtime error: invalid memory address or nil pointer dereference", "stack": "github.com/elastic/beats/v7/libbeat/logp.Recover\n\t/go/src/github.com/elastic/beats/libbeat/logp/global.go:101\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:969\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:212\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_windows.go:246\ngithub.com/elastic/beats/v7/x-pack/metricbeat/module/azure/app_insights.mapMetricValues\n\t/go/src/github.com/elastic/beats/x-pack/metricbeat/module/azure/app_insights/data.go:53\ngithub.com/elastic/beats/v7/x-pack/metricbeat/module/azure/app_insights.EventsMapping\n\t/go/src/github.com/elastic/beats/x-pack/metricbeat/module/azure/app_insights/data.go:125\ngithub.com/elastic/beats/v7/x-pack/metricbeat/module/azure/app_insights.(*MetricSet).Fetch\n\t/go/src/github.com/elastic/beats/x-pack/metricbeat/module/azure/app_insights/app_insights.go:74\ngithub.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).fetch\n\t/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:256\ngithub.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).startPeriodicFetching\n\t/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:224\ngithub.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).run\n\t/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:208\ngithub.com/elastic/beats/v7/metricbeat/mb/module.(*Wrapper).Start.func1\n\t/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:147"}

```

---

<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:** [March 3, 2021, 1:19pm UTC](https://discuss.elastic.co/t/recovered-from-panic-while-fetching-azure-app-insights-for-host-azure/263113/2 "2021-03-03T13:19:10Z")

</div>

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