Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metricbeat][Windows] Performance Counters, FATAL Failed due to panic #15264

Closed
StefanSa opened this issue Dec 28, 2019 · 2 comments · Fixed by #15305
Closed

[Metricbeat][Windows] Performance Counters, FATAL Failed due to panic #15264

StefanSa opened this issue Dec 28, 2019 · 2 comments · Fixed by #15305
Assignees
Labels
Team:Integrations Label for the Integrations team :Windows

Comments

@StefanSa
Copy link
Contributor

StefanSa commented Dec 28, 2019

  • Version: 7.5.1
  • Operating System: Windows 2016

#14684 bug, only partially fixed.

the config:

  metricsets:
    - perfmon
  period: 10s
  perfmon.ignore_non_existent_counters: true
  perfmon.group_measurements_by_instance: true
  perfmon.counters:
    - instance_label: processor.name
      instance_name: total
      measurement_label: processor.time.total.pct
      query: '\prozessor(_total)\prozessorzeit (%)'

    - instance_label: processor.name
      instance_name: total
      measurement_label: processor.usertime.total.pct
      query: '\prozessor(_total)\benutzerzeit (%)'

    - instance_label: processor.name
      instance_name: total
      measurement_label: processor.dpctime.total.pct
      query: '\prozessor(_total)\dpc-zeit (%)'

    - instance_label: processor.name
      instance_name: total
      measurement_label: processor.interrupttime.total.pct
      query: '\prozessor(_total)\interruptzeit (%)'

    - instance_label: processor.name
      instance_name: total
      measurement_label: processor.ideletime.total.pct
      query: '\prozessor(_total)\leerlaufzeit (%)'

    - instance_label: processor.name
      instance_name: total
      measurement_label: processor.privilegedtime.total.pct
      query: '\prozessor(_total)\privilegierte zeit (%)'

    - instance_label: physical_disk.name
      measurement_label: physical_disk.write.per_sec
      query: '\PhysicalDisk(*)\Disk Writes/sec'

    - instance_label: physical_disk.name
      measurement_label: physical_disk.write.time.pct
      query: '\PhysicalDisk(*)\% Disk Write Time'

With perfmon counter "PhysicalDisk" (last two instances) i get the following error:

2019-12-28T12:54:36.300+0100	INFO	runtime/panic.go:522	metricbeat stopped.
2019-12-28T12:54:36.300+0100	INFO	[monitoring]	elasticsearch/elasticsearch.go:284	Stop monitoring stats metrics snapshot loop.
2019-12-28T12:54:36.301+0100	FATAL	[metricbeat]	instance/beat.go:162	Failed due to panic.	{"panic": "runtime error: slice bounds 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:163\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\nruntime.panicslice\n\t/usr/local/go/src/runtime/panic.go:54\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:278\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:204\ngithub.com/elastic/beats/metricbeat/module/windows/perfmon.(*Query).GetCounterPaths\n\t/go/src/github.com/elastic/beats/metricbeat/module/windows/perfmon/pdh_query_windows.go:122\ngithub.com/elastic/beats/metricbeat/module/windows/perfmon.NewReader\n\t/go/src/github.com/elastic/beats/metricbeat/module/windows/perfmon/reader.go:62\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/mb/module.(*Factory).CheckConfig\n\t/go/src/github.com/elastic/beats/metricbeat/mb/module/factory.go:70\ngithub.com/elastic/beats/libbeat/cfgfile.(*Reloader).Check\n\t/go/src/github.com/elastic/beats/libbeat/cfgfile/reload.go:157\ngithub.com/elastic/beats/metricbeat/beater.(*Metricbeat).Run\n\t/go/src/github.com/elastic/beats/metricbeat/beater/metricbeat.go:221\ngithub.com/elastic/beats/libbeat/cmd/instance.(*Beat).launch\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:435\ngithub.com/elastic/beats/libbeat/cmd/instance.Run.func1\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:187\ngithub.com/elastic/beats/libbeat/cmd/instance.Run\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:188\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"}

No problems without these last two instances.
Please resolve the bug quickly.

@StefanSa
Copy link
Contributor Author

StefanSa commented Jan 2, 2020

@narph
Can you please check out what causes these problems, so that this can be turned off quickly.

@narph
Copy link
Contributor

narph commented Jan 2, 2020

@StefanSa , I was able to reproduce the issue while testing with the german language. The issue is unrelated to the previous issue/fix, it looks like the UTF16ToStringArray func is not able to read the next line start for certain unicode strings.
A potential fix has been created here #15305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Integrations Label for the Integrations team :Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants