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

Unable to get process details for CPU and memory usage #31177

Closed
bhupenbisht opened this issue Feb 11, 2024 · 5 comments
Closed

Unable to get process details for CPU and memory usage #31177

bhupenbisht opened this issue Feb 11, 2024 · 5 comments
Labels
needs triage New item requiring triage

Comments

@bhupenbisht
Copy link

Component(s)

cmd/otelcontribcol

Describe the issue you're reporting

Hi,

I am using otel contrib for window host. Getting all host metrics i.e CPU,disk. But Unable to get process details for CPU and memory usage.
Please advise
Regards
Bhupender

@bhupenbisht bhupenbisht added the needs triage New item requiring triage label Feb 11, 2024
@andrzej-stencel
Copy link
Member

Can you please share your collector configuration that you use?

@bhupenbisht
Copy link
Author

Hi astencel i am using otel contrib0. 94 version for my windows and linux maching. Using below configuration for both machine.

exporters:
prometheus:
endpoint: "https://xxxx.cloud.example.myoffice
headers: {"auth:xxxxxxxx"}

logging:
verbosity: detailed

extension:
health_check:

receivers:

hostmetrics:
collection_interval: 10s
scrapers:
cpu:
metrics:
system.cpu.time:
enabled: true
system.cpu.utilization:
enabled: true

disk:
  metrics:
    system.disk.io:
      enabled: true
    system.disk.operation:
      enabled: true

filesystem:
  metrics:
    system.filesystem.usage:
      enabled: true
    system.filesystem.utilization:
     enabled: true

memory:
  metrics:
    system.memory.usage:
      enabled: true
    system.memory.utilization:
      enabled: true

network:
  metrics:
    system.network.packets:
      enabled: true

process:
  metrics:
    process.cpu.time:
      enabled: true
    process.cpu.utilization:
      enabled: true
    process.memory.usage:
      enabled: true
    process.disk.io:
      enabled: true
    process.threads:
      enabled: true
    process.handles:
      enabled: true
    process.disk.operations:
      enabled: true
 
processes:
  metrics:
    system.processes.created:
      enabled: true

processors:

attributes:
actions:
- key: host_id
value: "${host.name}"
action: insert

   - key: os_name
    value: "${os.type}"
    action: insert

service:
pipelines:
metrics:
receivers:
- hostmetrics

  processors:
    - batch
    - attributes
  exporters: 
    - logging
    - otlphttp
  extensions:
    - health_check

@andrzej-stencel
Copy link
Member

In the configuration you pasted (it would help to format the Yaml correctly), you define logging and prometheus exporters, but in the service.pipelines you use logging and otlphttp. This configuration is incorrect.

Is this issue the same as #31290 or is this a different problem?

@bhupenbisht
Copy link
Author

aah its same issue.. Thanks

@andrzej-stencel
Copy link
Member

Duplicate of #31290

@andrzej-stencel andrzej-stencel marked this as a duplicate of #31290 Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

2 participants