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 perfmon wildcard queries with multiple brackets show wrong instance name #14273

Closed
peterdkdp opened this issue Oct 28, 2019 · 1 comment · Fixed by #14666
Assignees
Labels
Team:Integrations Label for the Integrations team :Windows

Comments

@peterdkdp
Copy link

peterdkdp commented Oct 28, 2019

Similar to issue #9835 , but I'm not sure if this should be handled as the same bug.
In the windows/perfmon module, when using a wildcard query with multiple brackets the string between the last brackets is used as instance name.

Module example from metricbeat.yml:

- module: windows
  metricsets: [perfmon]
  period: 1m
  perfmon.ignore_non_existent_counters: true
  perfmon.group_measurements_by_instance: true
  perfmon.counters:
    - instance_label: sqlserver.database.name
      measurement_label: database.log_file_size
      query: '\SQLServer:Databases(*)\Log File(s) Size (KB)'
      format: "long"
    - instance_label: sqlserver.database.name
      measurement_label: database.log_file_used_size
      query: '\SQLServer:Databases(*)\Log File(s) Used Size (KB)'
      format: "long"

Results in the following (example from Kibana discovery):
windows.perfmon.database.log_file_size 73,720
windows.perfmon.database.log_file_used_size 96,447
windows.perfmon.sqlserver.database.name KB

All database.name are "KB"

Elastic & Metricbeat version: 7.3.2

@narph narph self-assigned this Nov 12, 2019
@narph narph added Team:Integrations Label for the Integrations team :Windows labels Nov 12, 2019
@andresrc andresrc changed the title [Metricbeat] Windows perfmon wildcard queries with multiple brackets show wrong instance name [Metricbeat] Windows perfmon wildcard queries with multiple brackets show wrong instance name Nov 15, 2019
@narph
Copy link
Contributor

narph commented Nov 20, 2019

@peterdkdp , thanks for bringing this issue up.
It seems that the regular expression that matches the instance name was too permissive and was picking up the KB from the size instead of the instance name inside ...\SQLServer:Databases(instance name).

Potential solution and tests are found in the PR #14666.

This issue is not similar to #9835. The mentioned ticket talks about the added value of adding the counter to the instance name.

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.

3 participants