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

in procstat input plugin, process_name tag should be tagged not only procstat measurement but procstat_lookup measurement. #5498

Closed
Jaeyo opened this issue Feb 28, 2019 · 2 comments

Comments

@Jaeyo
Copy link
Contributor

Jaeyo commented Feb 28, 2019

Feature Request

in procstat input plugin, process_name tag also tagged in procstat_lookup measurement.

Proposal:

Current behavior:

procstat input plugin produce two measurement: procstat, procstat_lookup.
and process_name tag only tagged with procstat measurement.

# tag list
- procstat measurement
  - host
  - pattern
  - process_name
  - user
- procstat_lookup measurement
  - host
  - pattern

Desired behavior:

process_name should be tagged with procstat_lookup measurement also.

Use case: [Why is this important (helps with prioritizing requests)]

i'm checking specific processes aliveness with procstat_lookup measurement with pid_count field. if process_name tagged with procstat_lookup measurement, i think i can check it more clearly.

@danielnelson
Copy link
Contributor

During the lookup we don't know the process name yet, and the lookup may return multiple processes with differing names. One exception to this might be if it is set statically with the process_name option, though I'd like to do #3362 and then deprecate this option.

If you are setting the process_name, or even if not but you have a good idea of what it should be statically then you can use the tags option:

[[inputs.procstat]]
  [inputs.procstat.tags]
    process_name = "foo"

@tushar2013
Copy link

tushar2013 commented Sep 6, 2023

this does not overwrite the process_name tag of procstat measurement.
so if procstat if getting a name "foo" from /proc/<pid>/status and then you do above to set process_name as "my_foo"
then procstat_lookup will definitely have a tag as "process_name=my_foo" but procstat will still have "process_name=foo"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants