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 instance queries with one instance show instance name as asterisk #22218

Closed
aevalov opened this issue Oct 28, 2020 · 2 comments · Fixed by #22261
Assignees
Labels
Team:Platforms Label for the Integrations - Platforms team

Comments

@aevalov
Copy link

aevalov commented Oct 28, 2020

Metricbeat 7.8.1, 7.9.2
Windows Server 2019

Config sample:

  - object: "Hyper-V Dynamic Memory VM"
    instance: "*"
    counters:
    - name: "Physical Memory"
    - name: "Current Pressure"  

For Hyper-V hosts with two or more VMs it's ok.

    "windows": {
      "perfmon": {
        "metrics": {
          "current_pressure": 41
        },
        "object": "Hyper-V Dynamic Memory VM",
        "instance": "vm2"
      }
    },

For Hyper-V hosts with one VM it's look like:

    "windows": {
      "perfmon": {
        "instance": "*",
        "metrics": {
          "current_pressure": 7
        },
        "object": "Hyper-V Dynamic Memory VM"
      }
    },

As you can see, an asterisk mark used for instance name. Obviously that is wrong instance name.

Powershell on Hyper-V host with one VM:

get-counter "\Hyper-V Dynamic Memory VM(*)\Current Pressure"

Timestamp                 CounterSamples
---------                 --------------
28.10.2020 11:19:51       \\srv\hyper-v dynamic memory vm(vm1)\current pressure :
                          10
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 28, 2020
@andresrc andresrc added the Team:Platforms Label for the Integrations - Platforms team label Oct 28, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 28, 2020
@narph narph self-assigned this Oct 29, 2020
@narph
Copy link
Contributor

narph commented Oct 29, 2020

hi @aevalov , thanks for bringing this to our attention, I was able to reproduce this issue:


		  PS C:\Users\...> Get-Counter -Counter "\Hyper-V Dynamic Memory VM(*)\Physical Memory"

Timestamp                 CounterSamples
---------                 --------------
10/29/2020 10:29:52 AM    \\desktop-...\hyper-v dynamic memory vm(ubuntu 20.04.1 lts)\physical memory :
                          1798
"windows" : {
            "perfmon" : {
              "metrics" : {
                "physical_memory" : 1876
              },
              "object" : "Hyper-V Dynamic Memory VM",
              "instance" : "*"
            }
          }

A fix for this behavior is found here #22261, no workarounds at the moment, unless you specify the name of the instance in the configuration file instead of the wildcard.

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

Successfully merging a pull request may close this issue.

4 participants