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

Use labels for things like pid #311

Open
Roemer opened this issue Aug 7, 2024 · 1 comment
Open

Use labels for things like pid #311

Roemer opened this issue Aug 7, 2024 · 1 comment

Comments

@Roemer
Copy link

Roemer commented Aug 7, 2024

Currently, only the name can be configured with templates.
Wouldn't it be a good idea to allow to add labels to metrics?
So for example if I want to have a pid, this currently looks like:

namedprocess_namegroup_memory_bytes{groupname="node-301373",memtype="swapped"}

but with a config like:

process_names:
  - name: "{{.Comm}}"
    labels:
      - pid: "{{.PID}}"
    cmdline:
      - '.+'

the resulting entry would look like:

namedprocess_namegroup_memory_bytes{groupname="node",memtype="swapped", pid="301373"}

therefore making it simpler to group by names but still differentiate/filter via labels if wanted

@cicadadevops
Copy link

good idea

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

2 participants