# Perfmon panic when no matches to wildcard instance

**URL:** <https://discuss.elastic.co/t/perfmon-panic-when-no-matches-to-wildcard-instance/208505>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [November 19, 2019, 12:24pm UTC](https://discuss.elastic.co/t/perfmon-panic-when-no-matches-to-wildcard-instance/208505 "2019-11-19T12:24:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![repeltol](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@repeltol](https://discuss.elastic.co/u/repeltol)\
**Post date:** [November 19, 2019, 12:24pm UTC](https://discuss.elastic.co/t/perfmon-panic-when-no-matches-to-wildcard-instance/208505/1 "2019-11-19T12:24:33Z")

</div>

Metricbeat version: 7.4.2  
Windows version: Windows Server 2019

Perfmon part of the metricbeat.yml:

```
- metricsets:
    - perfmon
    module: windows
    perfmon.group_measurements_by_instance: true
    perfmon.ignore_non_existent_counters: true
    period: 10s
    perfmon.counters:
    - instance_label: web_netclr
        measurement_label: netclr.exceptions.per_sec
        query: \.NET CLR Exceptions(*w3wp*)\# of Exceps Thrown / sec
    - instance_label: web_netclr
        measurement_label: netclr.memory.gc_time.pct
        query: \.NET CLR Memory(*w3wp*)\% Time in GC

```

Powershell output for query `Get-Counter -Counter "\.NET CLR Memory(*w3wp*)\% Time in GC"` is empty because that counter doesn't exists yet due this being new server.

---

<div class="post-metadata">

**Author:** ![repeltol](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@repeltol](https://discuss.elastic.co/u/repeltol)\
**Post date:** [November 19, 2019, 12:27pm UTC](https://discuss.elastic.co/t/perfmon-panic-when-no-matches-to-wildcard-instance/208505/2 "2019-11-19T12:27:28Z")

</div>

Crash message:

```
2019-11-19T13:05:22.709+0100	FATAL	[metricbeat]	instance/beat.go:157	Failed due to panic.	{"panic": "runtime error: index out of range", "stack": "github.com/elastic/beats/libbeat/cmd/instance.Run.func1.1\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:158\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\nruntime.panicindex\n\t/usr/local/go/src/runtime/panic.go:44\ngithub.com/elastic/beats/metricbeat/module/windows/perfmon.UTF16ToStringArray\n\t/go/src/github.com/elastic/beats/metricbeat/module/windows/perfmon/pdh_query_windows.go:203\ngithub.com/elastic/beats/metricbeat/module/windows/perfmon.(*Query).ExpandWildCardPath\n\t/go/src/github.com/elastic/beats/metricbeat/module/windows/perfmon/pdh_query_windows.go:133\ngithub.com/elastic/beats/metricbeat/module/windows/perfmon.NewReader\n\t/go/src/github.com/elastic/beats/metricbeat/module/windows/perfmon/reader.go:63\ngithub.com/elastic/beats/metricbeat/module/windows/perfmon.New\n\t/go/src/github.com/elastic/beats/metricbeat/module/windows/perfmon/perfmon.go:79\ngithub.com/elastic/beats/metricbeat/mb.initMetricSets\n\t/go/src/github.com/elastic/beats/metricbeat/mb/builders.go:139\ngithub.com/elastic/beats/metricbeat/mb.NewModule\n\t/go/src/github.com/elastic/beats/metricbeat/mb/builders.go:65\ngithub.com/elastic/beats/metricbeat/mb/module.NewWrapper\n\t/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:84\ngithub.com/elastic/beats/metricbeat/beater.newMetricbeat\n\t/go/src/github.com/elastic/beats/metricbeat/beater/metricbeat.go:145\ngithub.com/elastic/beats/metricbeat/beater.Creator.func1\n\t/go/src/github.com/elastic/beats/metricbeat/beater/metricbeat.go:76\ngithub.com/elastic/beats/libbeat/cmd/instance.(*Beat).createBeater\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:352\ngithub.com/elastic/beats/libbeat/cmd/instance.(*Beat).launch\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:383\ngithub.com/elastic/beats/libbeat/cmd/instance.Run.func1\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:182\ngithub.com/elastic/beats/libbeat/cmd/instance.Run\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:183\ngithub.com/elastic/beats/libbeat/cmd.genRunCmd.func1\n\t/go/src/github.com/elastic/beats/libbeat/cmd/run.go:36\ngithub.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).execute\n\t/go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:704\ngithub.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).ExecuteC\n\t/go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:785\ngithub.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).Execute\n\t/go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:738\nmain.main\n\t/go/src/github.com/elastic/beats/x-pack/metricbeat/main.go:21\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:200"}
```

---

<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 17, 2019, 12:27pm UTC](https://discuss.elastic.co/t/perfmon-panic-when-no-matches-to-wildcard-instance/208505/3 "2019-12-17T12:27:33Z")

</div>

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