opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Error messages for hostmetrics from pseudo-processes or restricted processes should not give WARN errors

Open ekund opened this issue 3 years ago • 5 comments

Describe the bug On Windows, some processes that are either pseudo-processes, like pid 0, the System Idle process, or restricted processes, like pid 4, the System process, should not give WARN messages when the hostmetrics are being scraped. Right now, when scraping hostmetrics, there is an error like this:

"[error reading process name for pid 0: The parameter is incorrect.; error reading process name for pid 4: A device attached to the system is not functioning.; error reading process name for pid 68: A device attached to the system is not functioning.]"

Steps to reproduce Can be reproduced using a GCP Windows instance of windows-server-2019-dc-v20210112 image. And installed using the GCP ops-agent instructions: http://cloud/stackdriver/docs/solutions/ops-agent/installation#agent-install-latest-windows

What did you expect to see? No error messages should be at the WARN level or higher for processes where the process name can't be determined due to them being restricted system processes.

What did you see instead? Expecting to see no errors when hostmetrics are turned on.

What version did you use? v0.15.0

What config did you use? Collected hostmetrics, including process metrics.

hostmetrics:
    collection_interval: 60s
    scrapers:
      cpu:
      load:
      memory:
      disk:
      filesystem:
      network:
      swap:
      process:

Environment OS: GCP Windows instance of windows-server-2019-dc-v20210112 image.

Additional context The code that generates the error message: link. It would need to have some processes skipped on Windows systems, and log an info message instead.

ekund avatar Mar 22 '21 18:03 ekund

/cc @james-bebbington assigning to you since you are the expert

bogdandrutu avatar Mar 22 '21 22:03 bogdandrutu

Hey @james-bebbington, is there any update on this?

jkschulz avatar Oct 01 '21 14:10 jkschulz

@jsuereth

james-bebbington avatar Oct 01 '21 21:10 james-bebbington

There is a similar report at https://github.com/open-telemetry/opentelemetry-collector/issues/3004.

qingling128 avatar Dec 07 '21 19:12 qingling128

There is a similar report at #3004.

Exactly. And these errors are non harmful, which can be discarded. open-telemetry/opentelemetry-collector-contrib#7176 did a workaround to mute these spam errors.

dixudx avatar Sep 13 '22 03:09 dixudx

I think after that PR this issue is done. Feel free to reopen if not.

bogdandrutu avatar Dec 14 '22 23:12 bogdandrutu