Skip to content

[metricbeat/perfmon] Error reported when no error is present #38140

@leehinman

Description

@leehinman

PR #35896 introduced a bug in metricbeat perfmon module.

At

Error: fmt.Errorf("failed on query=%v: %w", counterPath, val.Err.Error),

The previous use of errors.Wrap, would have kept this as a nil error if val.Err.Error was nil, the current code makes a non nil Error.

This leads to things like the following in events:

"error.message": [
      "failed on query=\\\\SERVER01\\Processor(5)\\% DPC Time: %!w(<nil>)"
    ],

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions