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

Getting permission denied error for process scraper #34557

Closed
saiganeshkABI opened this issue Aug 9, 2024 · 1 comment
Closed

Getting permission denied error for process scraper #34557

saiganeshkABI opened this issue Aug 9, 2024 · 1 comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/hostmetrics

Comments

@saiganeshkABI
Copy link

Component(s)

receiver/hostmetrics

What happened?

Description

The process scraper is returning Permission denied error after including additional metrics

Steps to Reproduce

Add process scraper in hostmetrics receiver

Expected Result

Process metrics should be exported

Actual Result

Permission denied error for reading the process

Collector version

0.104.0

Environment information

Environment

OS: ubuntu
Compiler(if manually compiled): go1.22.2

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      http:
        endpoint: localhost:4318
      grpc:
        endpoint: localhost:4317
  hostmetrics:
    collection_interval: 30s 
    scrapers: 
      cpu:
        metrics:
          system.cpu.utilization:
            enabled: true
      memory:
        metrics:
          system.memory.utilization:
            enabled: true
      disk:
      load:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true
          process.disk.operations:
            enabled: true
      filesystem:
        metrics:
          system.filesystem.inodes.usage:
            enabled: false
          system.filesystem.utilization:
            enabled: true

exporters:
  datadog:
    api:
      key: $APIKEY
      site: datadoghq.com

service:
  extensions: [basicauth/otlp]
  pipelines:
    metrics:
      receivers: [otlp,hostmetrics]
      exporters: [datadog]
    traces:
      receivers: [otlp]
      exporters: [datadog]
      # exporters: [debug, otlp]
    logs:
      receivers: [otlp,filelog]
      exporters: [datadog]

Log output

2024-08-09T07:45:02.311Zerrorscraperhelper/scrapercontroller.go:197Error scraping metrics{"kind": "receiver", "name": "ho
stmetrics", "data_type": "metrics", "error": "error reading process executable for pid 1: readlink /proc/1/exe: permission denied; error
 reading process executable for pid 2: readlink /proc/2/exe: permission denied; error reading process executable for pid 3: readlink /pr
oc/3/exe: permission denied; error reading process executable for pid 4: readlink /proc/4/exe: permission denied; error reading process 
executable for pid 5: readlink /proc/5/exe: permission denied; error reading process executable for pid 6: readlink /proc/6/exe: permiss
ion denied; error reading process executable for pid 8: readlink /proc/8/exe: permission denied;

Additional context

No response

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

github-actions bot commented Aug 9, 2024

Pinging code owners:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/hostmetrics
Projects
None yet
Development

No branches or pull requests

1 participant