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

Enhance hostmetrics receiver process scraper to bring it closer to parity with telegraf procstat provided metrics #14084

Closed
jspaleta opened this issue Sep 12, 2022 · 5 comments

Comments

@jspaleta
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Found while migrating from telegraf based collection to otelcol, several process metrics are missing in the otelcol hostmetrics process scraper.

Describe the solution you'd like
Implement additional metrics in the hostmetrics process scraper to bring metrics coverage closer to parity with telegraf procstat. All the missing metrics are derived from gopsutil package.

Additional context
While migrating supported SumoLogic dashboard apps from using telegraf based fields to otelcol native metrics names, several metrics appear to be missing from otelcol native receivers.
The metrics listed are an identified subset of differences between telegraf procstat and the hostmetrics process scraper.

missing metrics

  1. telegraf name: major_faults (count of major page faults by process)
    telegraf plugin ref: https://github.com/influxdata/telegraf/blob/3d2b7bd210356c20701ce51eaf60480b314ad1c8/plugins/inputs/procstat/procstat.go#L196
    gopsutil ref: https://github.com/shirou/gopsutil/blob/434cc29594a81df897f1c07189309e6887bead42/process/process_linux.go#L332
    Suggested name: process.faults.major
  2. telegraf name: cpu_usage (percentage cpu used by process)
    gopsutil ref: https://github.com/shirou/gopsutil/blob/a63ec01c758209504c1d15e18604699d06d8ec23/process/process.go#L338
    Suggested name: process.cpu.utilization
  3. telegraf name: memory_usage (percentage of physical memory used by process)
    gopsutil ref: https://github.com/shirou/gopsutil/blob/a63ec01c758209504c1d15e18604699d06d8ec23/process/process.go#L317
    Suggested name: process.memory.utilization
  4. telegraf name: signals_pending (count of signals pending by process)
    telgraf plugin ref: https://github.com/influxdata/telegraf/blob/3d2b7bd210356c20701ce51eaf60480b314ad1c8/plugins/inputs/procstat/procstat.go#L255
    Suggested name: process.signals.pending
  5. telegraf name: created_at (Time in milliseconds(please check that) since unix epoch)
    telegraf plugin ref: https://github.com/influxdata/telegraf/blob/3d2b7bd210356c20701ce51eaf60480b314ad1c8/plugins/inputs/procstat/procstat.go#L212
    Suggested name: process.creation.time
  6. telegraf name: num_fds (number of file descriptors currently open by the process)
    telegraf plugin ref: https://github.com/influxdata/telegraf/blob/3d2b7bd210356c20701ce51eaf60480b314ad1c8/plugins/inputs/procstat/procstat.go#L185
    gopsutil ref:
    Suggested name: process.num_fds
  7. telegraf name: involuntary_context_switches (Number of involuntary context switches that have occurred for the process)
    telegraf plugin ref: https://github.com/influxdata/telegraf/blob/3d2b7bd210356c20701ce51eaf60480b314ad1c8/plugins/inputs/procstat/procstat.go#L185
    Suggested name: process.context_switches.involuntary
  8. telegraph name: read_count (Number of disk io reads)
    telegraf pluginm ref: https://github.com/influxdata/telegraf/blob/3d2b7bd210356c20701ce51eaf60480b314ad1c8/plugins/inputs/procstat/procstat.go#L204
    gopsutil ref: https://github.com/shirou/gopsutil/blob/a63ec01c758209504c1d15e18604699d06d8ec23/disk/disk_linux.go#L388
    Suggested name: process.read_count
  9. telegraph name: write_count (Number of disk io writes)
    telegraf pluginm ref: https://github.com/influxdata/telegraf/blob/3d2b7bd210356c20701ce51eaf60480b314ad1c8/plugins/inputs/procstat/procstat.go#L204
    gopsutil ref: https://github.com/shirou/gopsutil/blob/a63ec01c758209504c1d15e18604699d06d8ec23/disk/disk_linux.go#L388
    Suggested name: process.write_count
@github-actions
Copy link
Contributor

Pinging code owners: @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@evan-bradley
Copy link
Contributor

Thanks for the detailed report. I know that metrics 6 and 7 in your list will be added in #12972.

@andrzej-stencel
Copy link
Member

Thanks @jspaleta for writing this up.

Here's the proposal to add the first metric (page faults) to the semantic conventions spec: open-telemetry/opentelemetry-specification#2809.

@github-actions
Copy link
Contributor

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 Nov 21, 2022
@github-actions
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants