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

Not getting all status metrics from otel collector processes scraper #34841

Open
Praveen2099 opened this issue Aug 26, 2024 · 5 comments
Open
Labels

Comments

@Praveen2099
Copy link

Component(s)

receiver/hostmetrics

What happened?

Hi, we’re not getting all the process states from the OpenTelemetry Collector. We only see the following metrics:

system_processes_count{nodename="nodename", source="otel_hostmetrics", status="blocked"} 0 system_processes_count{nodename="nodename", source="otel_hostmetrics", status="running"} 20 system_processes_count{nodename="nodename", source="otel_hostmetrics", status="sleeping"} 49 system_processes_count{nodename="nodename", source="otel_hostmetrics", status="unknown"} 1371

We’re missing other states like zombies, idle, locked, etc. Here is the configuration for the receivers: receivers:
hostmetrics:
   collection_interval: 10s
   scrapers:
     process:
     processes:

Can someone explain where the OpenTelemetry Collector scraper retrieves process state metrics from? The process state counts from the OpenTelemetry metrics do not match the output of ps -ef or ps -eo state= | sort | uniq -c:
1 R
4 S

For the same node, the metrics count from collectd is also different at the same point in time. Here are the collectd metrics:

collectd_processes_ps_state{processes="blocked",instance="nodename"} 0 1724657676710 collectd_processes_ps_state{processes="paging",instance="nodename"} 0 1724657676710 collectd_processes_ps_state{processes="running",instance="nodename"} 8 1724657676710 collectd_processes_ps_state{processes="sleeping",instance="nodename"} 2 1724657676710 collectd_processes_ps_state{processes="stopped",instance="nodename"} 0 1724657676710 collectd_processes_ps_state{processes="zombies",instance="nodename"} 0 1724657676710

Can someone help to get the correct metrics from the OpenTelemetry Collector and suggest a process to validate them manually?

Collector version

V0.106.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

receivers:
   hostmetrics: 
     collection_interval: 10s
     scrapers:
       process:
       processes:

Log output

No response

Additional context

No response

@Praveen2099 Praveen2099 added bug Something isn't working needs triage New item requiring triage labels Aug 26, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@Praveen2099
Copy link
Author

Praveen2099 commented Aug 26, 2024

Hi @HaxBaba123 @seeronline thanks for the response.
Sorry i didn't understand.can you please elaborate more what exactly i need to do

@flyinghead
Copy link

@rogercoll
Copy link
Contributor

Can someone explain where the OpenTelemetry Collector scraper retrieves process state metrics from?

In GNU/Linux OSes it retrieves process values from the /proc filesystem.

Do you see any error/waring in the collector logs related to the process scraper? The collector should have read access to the /proc filesystem in order to provide all the processe's metrics.

Copy link
Contributor

github-actions bot commented Dec 2, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

11 participants
@atoulme @flyinghead @rogercoll @Praveen2099 and others