-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Per process hostmetrics are not scraped #18232
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
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@EdwardKuenen please reformat the issue to use a block of code so we can read the prometheus output, thanks! |
+1 for this issue If Lines 174 to 180 in c079a8f
Lines 46 to 49 in c079a8f
This happens for all processes which do not have actually real executable (usually it is the case of system processes and/or kernel threads)
|
@dmitryax Do you think we could just use empty path (instead of raising an error) for processes we cannot get valid executable? In that case, I'm getting the following errors:
Different question is do we have to log these errors if this is kind of expected that some processes behaves differently than regular ones. |
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 Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Any updates on this issue? |
@EdwardKuenen you can use configuration options listed here https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver#process to mute these errors these especially
|
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 Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@EdwardKuenen To see the data correctly with the Prometheus exporter, you also need to update the Prometheus exporter configuration adding receivers:
hostmetrics:
scrapers:
process:
metrics:
process.cpu.utilization:
enabled: true
mute_process_name_error: false
exporters:
prometheus:
endpoint: 0.0.0.0:1234
resource_to_telemetry_conversion:
enabled: true
service:
pipelines:
metrics:
receivers: [hostmetrics]
exporters: [prometheus] |
Thank you very much @astencel-sumo, that setting did the trick to get the counters! |
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
receiver/hostmetrics
What happened?
Description
When using the hostmetrics receiver with the process scraper the per process metrics are not scraped.
Steps to Reproduce
./otelcol-contrib --config otelcol.yml
curl http://localhost:1234/metrics
Expected Result
No errors
CPU usage per process in the metrics
Actual Result
Errors in the output of the collector.
Only cumulative counters.
Collector version
v0.70.0, v0.72.0
Environment information
Environment
OS: "Ubuntu 22.10", "CentOS-8"
OpenTelemetry Collector configuration
Log output
Additional context
Output metrics
The text was updated successfully, but these errors were encountered: